@lukso/lsp-smart-contracts 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +68 -47
- package/artifacts/LSP0ERC725AccountInit.json +68 -47
- package/artifacts/LSP11BasicSocialRecovery.json +18 -2
- package/artifacts/LSP11BasicSocialRecoveryInit.json +18 -2
- package/artifacts/LSP16UniversalFactory.json +3 -3
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +27 -46
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +27 -46
- package/artifacts/LSP23LinkedContractsFactory.json +3 -3
- package/artifacts/LSP4DigitalAssetMetadata.json +16 -0
- package/artifacts/LSP4DigitalAssetMetadataInitAbstract.json +16 -0
- package/artifacts/LSP6KeyManager.json +34 -6
- package/artifacts/LSP6KeyManagerInit.json +34 -6
- package/artifacts/LSP7CappedSupply.json +64 -4
- package/artifacts/LSP7CappedSupplyInitAbstract.json +64 -4
- package/artifacts/LSP7CompatibleERC20.json +83 -23
- package/artifacts/LSP7CompatibleERC20InitAbstract.json +83 -23
- package/artifacts/LSP7CompatibleERC20Mintable.json +86 -26
- package/artifacts/LSP7CompatibleERC20MintableInit.json +86 -26
- package/artifacts/LSP7DigitalAsset.json +64 -4
- package/artifacts/LSP7DigitalAssetInitAbstract.json +64 -4
- package/artifacts/LSP7Mintable.json +67 -7
- package/artifacts/LSP7MintableInit.json +67 -7
- package/artifacts/LSP8CappedSupply.json +57 -3
- package/artifacts/LSP8CappedSupplyInitAbstract.json +57 -3
- package/artifacts/LSP8CompatibleERC721.json +79 -25
- package/artifacts/LSP8CompatibleERC721InitAbstract.json +79 -25
- package/artifacts/LSP8CompatibleERC721Mintable.json +87 -28
- package/artifacts/LSP8CompatibleERC721MintableInit.json +87 -28
- package/artifacts/LSP8IdentifiableDigitalAsset.json +57 -3
- package/artifacts/LSP8IdentifiableDigitalAssetInitAbstract.json +57 -3
- package/artifacts/LSP8Mintable.json +65 -6
- package/artifacts/LSP8MintableInit.json +65 -6
- package/artifacts/LSP9Vault.json +51 -35
- package/artifacts/LSP9VaultInit.json +51 -35
- package/artifacts/UniversalProfile.json +68 -47
- package/artifacts/UniversalProfileInit.json +68 -47
- package/contracts/Factories/Create2Factory.sol +1 -1
- package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +0 -22
- package/contracts/LSP0ERC725Account/LSP0Constants.sol +6 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +12 -2
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +196 -123
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +1 -1
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +11 -2
- package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +5 -3
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +54 -14
- package/contracts/LSP11BasicSocialRecovery/LSP11Constants.sol +1 -1
- package/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol +1 -1
- package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +2 -2
- package/contracts/LSP14Ownable2Step/LSP14Constants.sol +1 -1
- package/contracts/LSP14Ownable2Step/LSP14Errors.sol +9 -3
- package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +16 -12
- package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +65 -96
- package/contracts/LSP17ContractExtension/LSP17Errors.sol +1 -1
- package/contracts/LSP17ContractExtension/LSP17Extendable.sol +22 -15
- package/contracts/LSP17ContractExtension/LSP17Extension.sol +6 -5
- package/contracts/LSP17Extensions/Extension4337.sol +101 -0
- package/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol +15 -0
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +1 -2
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiverDelegate.sol +24 -0
- package/contracts/LSP1UniversalReceiver/LSP1Constants.sol +1 -0
- package/contracts/LSP1UniversalReceiver/LSP1Errors.sol +0 -6
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +49 -33
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +33 -27
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +5 -48
- package/contracts/LSP20CallVerification/ILSP20CallVerifier.sol +13 -9
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +64 -45
- package/contracts/LSP20CallVerification/LSP20Constants.sol +6 -6
- package/contracts/LSP20CallVerification/LSP20Errors.sol +10 -4
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/ILSP23LinkedContractsFactory.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/IPostDeploymentModule.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23Errors.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/LSP23LinkedContractsFactory.sol +5 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfileInitPostDeploymentModule.sol +1 -1
- package/contracts/{LSP23LinkedContractsDeployment → LSP23LinkedContractsFactory}/modules/UniversalProfilePostDeploymentModule.sol +1 -1
- package/contracts/LSP25ExecuteRelayCall/LSP25Constants.sol +1 -1
- package/contracts/LSP25ExecuteRelayCall/LSP25MultiChannelNonce.sol +8 -3
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +1 -97
- package/contracts/LSP3ProfileMetadata/LSP3Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol +1 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +8 -3
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +8 -3
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +4 -3
- package/contracts/LSP6KeyManager/LSP6Constants.sol +4 -3
- package/contracts/LSP6KeyManager/LSP6Errors.sol +2 -23
- package/contracts/LSP6KeyManager/LSP6KeyManager.sol +0 -1
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +176 -101
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +0 -1
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +1 -2
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteRelayCallModule.sol +27 -0
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +34 -28
- package/contracts/LSP6KeyManager/LSP6Utils.sol +29 -2
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +70 -10
- package/contracts/LSP7DigitalAsset/LSP7Constants.sol +2 -2
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +29 -13
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +273 -265
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +28 -12
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +17 -3
- package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +5 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +4 -1
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +7 -7
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +3 -3
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +128 -54
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +129 -54
- package/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +3 -3
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +2 -2
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +4 -4
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +1 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +4 -4
- package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +16 -11
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.sol +20 -6
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +32 -16
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +67 -16
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +143 -137
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +69 -15
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8BurnableInitAbstract.sol +1 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +3 -3
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +172 -80
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +178 -91
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +7 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +3 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +8 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +5 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +13 -7
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +9 -8
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol +9 -3
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +10 -8
- package/contracts/LSP9Vault/ILSP9Vault.sol +0 -21
- package/contracts/LSP9Vault/LSP9Constants.sol +6 -1
- package/contracts/LSP9Vault/LSP9Errors.sol +1 -1
- package/contracts/LSP9Vault/LSP9Vault.sol +11 -2
- package/contracts/LSP9Vault/LSP9VaultCore.sol +119 -66
- package/contracts/LSP9Vault/LSP9VaultInit.sol +1 -1
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +11 -2
- package/contracts/UniversalProfile.sol +1 -1
- package/contracts/UniversalProfileInit.sol +1 -1
- package/contracts/UniversalProfileInitAbstract.sol +1 -1
- package/contracts/Version.sol +16 -0
- package/devdocs/LSP0ERC725Account.json +86 -52
- package/devdocs/LSP0ERC725AccountInit.json +86 -52
- package/devdocs/LSP11BasicSocialRecovery.json +13 -0
- package/devdocs/LSP11BasicSocialRecoveryInit.json +13 -0
- package/devdocs/LSP16UniversalFactory.json +9 -9
- package/devdocs/LSP1UniversalReceiverDelegateUP.json +7 -6
- package/devdocs/LSP1UniversalReceiverDelegateVault.json +7 -6
- package/devdocs/LSP4DigitalAssetMetadata.json +32 -10
- package/devdocs/LSP4DigitalAssetMetadataInitAbstract.json +32 -10
- package/devdocs/LSP6KeyManager.json +27 -13
- package/devdocs/LSP6KeyManagerInit.json +27 -13
- package/devdocs/LSP7CappedSupply.json +61 -28
- package/devdocs/LSP7CappedSupplyInitAbstract.json +61 -28
- package/devdocs/LSP7CompatibleERC20.json +102 -32
- package/devdocs/LSP7CompatibleERC20InitAbstract.json +102 -32
- package/devdocs/LSP7CompatibleERC20Mintable.json +102 -32
- package/devdocs/LSP7CompatibleERC20MintableInit.json +102 -32
- package/devdocs/LSP7DigitalAsset.json +61 -28
- package/devdocs/LSP7DigitalAssetInitAbstract.json +61 -28
- package/devdocs/LSP7Mintable.json +61 -28
- package/devdocs/LSP7MintableInit.json +61 -28
- package/devdocs/LSP8CappedSupply.json +66 -27
- package/devdocs/LSP8CappedSupplyInitAbstract.json +66 -27
- package/devdocs/LSP8CompatibleERC721.json +93 -33
- package/devdocs/LSP8CompatibleERC721InitAbstract.json +93 -33
- package/devdocs/LSP8CompatibleERC721Mintable.json +95 -35
- package/devdocs/LSP8CompatibleERC721MintableInit.json +96 -36
- package/devdocs/LSP8IdentifiableDigitalAsset.json +70 -28
- package/devdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +66 -27
- package/devdocs/LSP8Mintable.json +68 -29
- package/devdocs/LSP8MintableInit.json +69 -30
- package/devdocs/LSP9Vault.json +69 -41
- package/devdocs/LSP9VaultInit.json +69 -41
- package/devdocs/UniversalProfile.json +86 -52
- package/devdocs/UniversalProfileInit.json +86 -52
- package/dist/constants.cjs.js +5565 -2846
- package/dist/constants.d.ts +3996 -1182
- package/dist/constants.es.js +5564 -2846
- package/package.json +8 -8
- package/userdocs/LSP0ERC725Account.json +20 -11
- package/userdocs/LSP0ERC725AccountInit.json +20 -11
- package/userdocs/LSP16UniversalFactory.json +26 -1
- package/userdocs/LSP1UniversalReceiverDelegateUP.json +4 -11
- package/userdocs/LSP1UniversalReceiverDelegateVault.json +4 -11
- package/userdocs/LSP4DigitalAssetMetadata.json +7 -4
- package/userdocs/LSP4DigitalAssetMetadataInitAbstract.json +7 -4
- package/userdocs/LSP6KeyManager.json +3 -5
- package/userdocs/LSP6KeyManagerInit.json +3 -5
- package/userdocs/LSP7CappedSupply.json +17 -6
- package/userdocs/LSP7CappedSupplyInitAbstract.json +16 -5
- package/userdocs/LSP7CompatibleERC20.json +18 -5
- package/userdocs/LSP7CompatibleERC20InitAbstract.json +18 -5
- package/userdocs/LSP7CompatibleERC20Mintable.json +18 -5
- package/userdocs/LSP7CompatibleERC20MintableInit.json +18 -5
- package/userdocs/LSP7DigitalAsset.json +18 -5
- package/userdocs/LSP7DigitalAssetInitAbstract.json +18 -5
- package/userdocs/LSP7Mintable.json +18 -5
- package/userdocs/LSP7MintableInit.json +18 -5
- package/userdocs/LSP8CappedSupply.json +16 -5
- package/userdocs/LSP8CappedSupplyInitAbstract.json +15 -4
- package/userdocs/LSP8CompatibleERC721.json +30 -17
- package/userdocs/LSP8CompatibleERC721InitAbstract.json +30 -17
- package/userdocs/LSP8CompatibleERC721Mintable.json +31 -18
- package/userdocs/LSP8CompatibleERC721MintableInit.json +32 -19
- package/userdocs/LSP8IdentifiableDigitalAsset.json +18 -5
- package/userdocs/LSP8IdentifiableDigitalAssetInitAbstract.json +17 -4
- package/userdocs/LSP8Mintable.json +18 -5
- package/userdocs/LSP8MintableInit.json +19 -6
- package/userdocs/LSP9Vault.json +23 -14
- package/userdocs/LSP9VaultInit.json +23 -14
- package/userdocs/UniversalProfile.json +20 -11
- package/userdocs/UniversalProfileInit.json +20 -11
- package/CONTRIBUTING.md +0 -184
- package/artifacts/LSP4Compatibility.json +0 -216
- package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +0 -25
- package/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol +0 -38
- package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +0 -83
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +0 -175
- package/devdocs/LSP4Compatibility.json +0 -79
- package/userdocs/LSP4Compatibility.json +0 -20
|
@@ -2,63 +2,79 @@
|
|
|
2
2
|
"author": "Fabian Vogelsteller <fabian@lukso.network>, Jean Cavallera (CJ42)",
|
|
3
3
|
"details": "A smart contract account including basic functionalities such as: - Detecting supported standards using [ERC-165] - Executing several operation on other addresses including creating contracts using [ERC-725X] - A generic data key-value store using [ERC-725Y] - Validating signatures using [ERC-1271] - Receiving notification and react on them using [LSP-1-UniversalReceiver] - Safer ownership management through 2-steps transfer using [LSP-14-Ownable2Step] - Extending the account with new functions and interfaceIds of future standards using [LSP-17-ContractExtension] - Verifying calls on the owner to make it easier to interact with the account directly using [LSP-20-CallVerification]",
|
|
4
4
|
"errors": {
|
|
5
|
-
"CannotTransferOwnershipToSelf()": [
|
|
6
|
-
{
|
|
7
|
-
"details": "Reverts when trying to transfer ownership to the `address(this)`."
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
5
|
"ERC725X_ContractDeploymentFailed()": [
|
|
11
6
|
{
|
|
12
|
-
"details": "
|
|
7
|
+
"details": "Reverts when contract deployment failed via {execute} or {executeBatch} functions, This error can occur using either operation type 1 (`CREATE`) or 2 (`CREATE2`)."
|
|
13
8
|
}
|
|
14
9
|
],
|
|
15
10
|
"ERC725X_CreateOperationsRequireEmptyRecipientAddress()": [
|
|
16
11
|
{
|
|
17
|
-
"details": "
|
|
12
|
+
"details": "Reverts when passing a `to` address that is not `address(0)` (= address zero) while deploying a contract via {execute} or {executeBatch} functions. This error can occur using either operation type 1 (`CREATE`) or 2 (`CREATE2`)."
|
|
18
13
|
}
|
|
19
14
|
],
|
|
20
15
|
"ERC725X_ExecuteParametersEmptyArray()": [
|
|
21
16
|
{
|
|
22
|
-
"details": "
|
|
17
|
+
"details": "Reverts when one of the array parameter provided to the {executeBatch} function is an empty array."
|
|
23
18
|
}
|
|
24
19
|
],
|
|
25
20
|
"ERC725X_ExecuteParametersLengthMismatch()": [
|
|
26
21
|
{
|
|
27
|
-
"details": "
|
|
22
|
+
"details": "Reverts when there is not the same number of elements in the `operationTypes`, `targets` addresses, `values`, and `datas` array parameters provided when calling the {executeBatch} function."
|
|
28
23
|
}
|
|
29
24
|
],
|
|
30
25
|
"ERC725X_InsufficientBalance(uint256,uint256)": [
|
|
31
26
|
{
|
|
32
|
-
"details": "
|
|
27
|
+
"details": "Reverts when trying to send more native tokens `value` than available in current `balance`.",
|
|
33
28
|
"params": {
|
|
34
|
-
"balance": "
|
|
35
|
-
"value": "
|
|
29
|
+
"balance": "The balance of native tokens of the ERC725X smart contract.",
|
|
30
|
+
"value": "The amount of native tokens sent via `ERC725X.execute(...)`/`ERC725X.executeBatch(...)` that is greater than the contract's `balance`."
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
33
|
],
|
|
39
34
|
"ERC725X_MsgValueDisallowedInDelegateCall()": [
|
|
40
35
|
{
|
|
41
|
-
"details": "
|
|
36
|
+
"details": "Reverts when trying to send native tokens (`value` / `values[]` parameter of {execute} or {executeBatch} functions) while making a `delegatecall` (`operationType == 4`). Sending native tokens via `staticcall` is not allowed because `msg.value` is persisting."
|
|
42
37
|
}
|
|
43
38
|
],
|
|
44
39
|
"ERC725X_MsgValueDisallowedInStaticCall()": [
|
|
45
40
|
{
|
|
46
|
-
"details": "
|
|
41
|
+
"details": "Reverts when trying to send native tokens (`value` / `values[]` parameter of {execute} or {executeBatch} functions) while making a `staticcall` (`operationType == 3`). Sending native tokens via `staticcall` is not allowed because it is a state changing operation."
|
|
47
42
|
}
|
|
48
43
|
],
|
|
49
44
|
"ERC725X_NoContractBytecodeProvided()": [
|
|
50
45
|
{
|
|
51
|
-
"details": "
|
|
46
|
+
"details": "Reverts when no contract bytecode was provided as parameter when trying to deploy a contract via {execute} or {executeBatch}. This error can occur using either operation type 1 (`CREATE`) or 2 (`CREATE2`)."
|
|
52
47
|
}
|
|
53
48
|
],
|
|
54
49
|
"ERC725X_UnknownOperationType(uint256)": [
|
|
55
50
|
{
|
|
56
|
-
"details": "
|
|
51
|
+
"details": "Reverts when the `operationTypeProvided` is none of the default operation types available. (CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4)",
|
|
52
|
+
"params": {
|
|
53
|
+
"operationTypeProvided": "The unrecognised operation type number provided to `ERC725X.execute(...)`/`ERC725X.executeBatch(...)`."
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"ERC725Y_DataKeysValuesEmptyArray()": [
|
|
58
|
+
{
|
|
59
|
+
"details": "Reverts when one of the array parameter provided to {setDataBatch} function is an empty array."
|
|
57
60
|
}
|
|
58
61
|
],
|
|
59
62
|
"ERC725Y_DataKeysValuesLengthMismatch()": [
|
|
60
63
|
{
|
|
61
|
-
"details": "
|
|
64
|
+
"details": "Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the {setDataBatch} function."
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"LSP14CallerNotPendingOwner(address)": [
|
|
68
|
+
{
|
|
69
|
+
"details": "Reverts when the `caller` that is trying to accept ownership of the contract is not the pending owner.",
|
|
70
|
+
"params": {
|
|
71
|
+
"caller": "The address that tried to accept ownership."
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"LSP14CannotTransferOwnershipToSelf()": [
|
|
76
|
+
{
|
|
77
|
+
"details": "Reverts when trying to transfer ownership to the `address(this)`."
|
|
62
78
|
}
|
|
63
79
|
],
|
|
64
80
|
"LSP14MustAcceptOwnershipInSeparateTransaction()": [
|
|
@@ -66,43 +82,51 @@
|
|
|
66
82
|
"details": "Reverts when pending owner accept ownership in the same transaction of transferring ownership."
|
|
67
83
|
}
|
|
68
84
|
],
|
|
69
|
-
"
|
|
85
|
+
"LSP14NotInRenounceOwnershipInterval(uint256,uint256)": [
|
|
70
86
|
{
|
|
71
|
-
"details": "
|
|
87
|
+
"details": "Reverts when trying to renounce ownership before the initial confirmation delay.",
|
|
72
88
|
"params": {
|
|
73
|
-
"
|
|
89
|
+
"renounceOwnershipEnd": "The end timestamp when one can confirm the renouncement of ownership.",
|
|
90
|
+
"renounceOwnershipStart": "The start timestamp when one can confirm the renouncement of ownership."
|
|
74
91
|
}
|
|
75
92
|
}
|
|
76
93
|
],
|
|
77
|
-
"
|
|
94
|
+
"LSP20CallVerificationFailed(bool,bytes4)": [
|
|
78
95
|
{
|
|
79
|
-
"details": "reverts when the call to the owner does not return the
|
|
96
|
+
"details": "reverts when the call to the owner does not return the LSP20 success value",
|
|
80
97
|
"params": {
|
|
81
98
|
"postCall": "True if the execution call was done, False otherwise",
|
|
82
|
-
"
|
|
99
|
+
"returnedStatus": "The bytes4 decoded data returned by the logic verifier."
|
|
83
100
|
}
|
|
84
101
|
}
|
|
85
102
|
],
|
|
86
|
-
"
|
|
103
|
+
"LSP20CallingVerifierFailed(bool)": [
|
|
87
104
|
{
|
|
88
|
-
"details": "reverts when
|
|
105
|
+
"details": "reverts when the call to the owner fail with no revert reason",
|
|
106
|
+
"params": {
|
|
107
|
+
"postCall": "True if the execution call was done, False otherwise"
|
|
108
|
+
}
|
|
89
109
|
}
|
|
90
110
|
],
|
|
91
|
-
"
|
|
111
|
+
"LSP20EOACannotVerifyCall(address)": [
|
|
92
112
|
{
|
|
93
|
-
"details": "Reverts when
|
|
113
|
+
"details": "Reverts when the logic verifier is an Externally Owned Account (EOA) that cannot return the LSP20 success value.",
|
|
94
114
|
"params": {
|
|
95
|
-
"
|
|
96
|
-
"renounceOwnershipStart": "The start timestamp when one can confirm the renouncement of ownership."
|
|
115
|
+
"logicVerifier": "The address of the logic verifier"
|
|
97
116
|
}
|
|
98
117
|
}
|
|
118
|
+
],
|
|
119
|
+
"NoExtensionFoundForFunctionSelector(bytes4)": [
|
|
120
|
+
{
|
|
121
|
+
"details": "reverts when there is no extension for the function selector being called with"
|
|
122
|
+
}
|
|
99
123
|
]
|
|
100
124
|
},
|
|
101
125
|
"kind": "dev",
|
|
102
126
|
"methods": {
|
|
103
127
|
"acceptOwnership()": {
|
|
104
128
|
"custom:requirements": "- Only the {pendingOwner} can call this function. - When notifying the previous owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_SenderNotification]. - When notifying the new owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_RecipientNotification].",
|
|
105
|
-
"details": "Transfer ownership of the contract from the current {owner()} to the {pendingOwner()}. Once this function is called: - The current {owner()} will
|
|
129
|
+
"details": "Transfer ownership of the contract from the current {owner()} to the {pendingOwner()}. Once this function is called: - The current {owner()} will lose access to the functions restricted to the {owner()} only. - The {pendingOwner()} will gain access to the functions restricted to the {owner()} only."
|
|
106
130
|
},
|
|
107
131
|
"batchCalls(bytes[])": {
|
|
108
132
|
"custom:info": "It's not possible to send value along the functions call due to the use of `delegatecall`.",
|
|
@@ -118,36 +142,39 @@
|
|
|
118
142
|
"details": "Locks the base contract on deployment, so that it cannot be initialized, owned and controlled by anyone after it has been deployed. This is intended so that the sole purpose of this contract is to be used as a base contract behind a proxy."
|
|
119
143
|
},
|
|
120
144
|
"execute(uint256,address,uint256,bytes)": {
|
|
121
|
-
"custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {
|
|
145
|
+
"custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). - {UniversalReceiver} event when receiving native tokens.",
|
|
122
146
|
"custom:requirements": "- Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0.",
|
|
123
|
-
"details": "Generic executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `data` parameter. - deploy a contract by providing its creation bytecode in the `data` parameter.
|
|
147
|
+
"details": "Generic executor function to: - send native tokens to any address. - interact with any contract by passing an abi-encoded function call in the `data` parameter. - deploy a contract by providing its creation bytecode in the `data` parameter.",
|
|
124
148
|
"params": {
|
|
125
|
-
"data": "The call data, or the creation bytecode of the contract to deploy",
|
|
149
|
+
"data": "The call data, or the creation bytecode of the contract to deploy if `operationType` is `1` or `2`.",
|
|
126
150
|
"operationType": "The operation type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4",
|
|
127
151
|
"target": "The address of the EOA or smart contract. (unused if a contract is created via operation type 1 or 2)",
|
|
128
152
|
"value": "The amount of native tokens to transfer (in Wei)"
|
|
129
153
|
}
|
|
130
154
|
},
|
|
131
155
|
"executeBatch(uint256[],address[],uint256[],bytes[])": {
|
|
132
|
-
"custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration) - {
|
|
156
|
+
"custom:events": "- {Executed} event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration) - {ContractCreated} event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration) - {UniversalReceiver} event when receiving native tokens.",
|
|
133
157
|
"custom:requirements": "- The length of the parameters provided must be equal. - Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner. - If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. - If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. - If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0.",
|
|
134
|
-
"
|
|
158
|
+
"custom:warning": "- The `msg.value` should not be trusted for any method called within the batch with `operationType`: `DELEGATECALL` (4).",
|
|
159
|
+
"details": "Batch executor function that behaves the same as {execute} but allowing multiple operations in the same transaction.",
|
|
135
160
|
"params": {
|
|
136
|
-
"datas": "The list of
|
|
137
|
-
"operationsType": "The list of operations type used: CALL = 0
|
|
161
|
+
"datas": "The list of calldata, or the creation bytecode of the contract to deploy if `operationType` is `1` or `2`.",
|
|
162
|
+
"operationsType": "The list of operations type used: `CALL = 0`; `CREATE = 1`; `CREATE2 = 2`; `STATICCALL = 3`; `DELEGATECALL = 4`",
|
|
138
163
|
"targets": "The list of addresses to call. `targets` will be unused if a contract is created (operation types 1 and 2).",
|
|
139
|
-
"values": "The list of native token amounts to transfer (in Wei)"
|
|
164
|
+
"values": "The list of native token amounts to transfer (in Wei)."
|
|
140
165
|
}
|
|
141
166
|
},
|
|
142
167
|
"getData(bytes32)": {
|
|
168
|
+
"details": "Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`.",
|
|
143
169
|
"params": {
|
|
144
|
-
"dataKey": "The key which
|
|
170
|
+
"dataKey": "The data key for which to retrieve the value."
|
|
145
171
|
},
|
|
146
172
|
"returns": {
|
|
147
|
-
"dataValue": "The
|
|
173
|
+
"dataValue": "The bytes value stored under the specified data key."
|
|
148
174
|
}
|
|
149
175
|
},
|
|
150
176
|
"getDataBatch(bytes32[])": {
|
|
177
|
+
"details": "Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`.",
|
|
151
178
|
"params": {
|
|
152
179
|
"dataKeys": "The array of keys which values to retrieve"
|
|
153
180
|
},
|
|
@@ -156,20 +183,20 @@
|
|
|
156
183
|
}
|
|
157
184
|
},
|
|
158
185
|
"initialize(address)": {
|
|
159
|
-
"custom:events": "- {
|
|
186
|
+
"custom:events": "- {UniversalReceiver} event when funding the contract on deployment. - {OwnershipTransferred} event when `initialOwner` is set as the contract {owner}.",
|
|
160
187
|
"details": "Set `initialOwner` as the contract owner. The `initialize(address)` also allows funding the contract on deployment.",
|
|
161
188
|
"params": {
|
|
162
189
|
"initialOwner": "The owner of the contract."
|
|
163
190
|
}
|
|
164
191
|
},
|
|
165
192
|
"isValidSignature(bytes32,bytes)": {
|
|
166
|
-
"details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the `
|
|
193
|
+
"details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the `_ERC1271_SUCCESSVALUE` if the address recovered is the same as the owner, indicating that it was a valid signature. - If the address is different, it returns the `_ERC1271_FAILVALUE` indicating that the signature is not valid. 2. If the owner is a smart contract, it forwards the call of {isValidSignature()} to the owner contract: - If the contract fails or returns the `_ERC1271_FAILVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_FAILVALUE`, indicating that the signature is not valid. - If the {isValidSignature()} on the owner returned the `_ERC1271_SUCCESSVALUE`, the {isValidSignature()} on the account returns the `_ERC1271_SUCCESSVALUE`, indicating that it's a valid signature.",
|
|
167
194
|
"params": {
|
|
168
195
|
"dataHash": "The hash of the data to be validated.",
|
|
169
196
|
"signature": "A signature that can validate the previous parameter (Hash)."
|
|
170
197
|
},
|
|
171
198
|
"returns": {
|
|
172
|
-
"
|
|
199
|
+
"returnedStatus": "A `bytes4` value that indicates if the signature is valid or not."
|
|
173
200
|
}
|
|
174
201
|
},
|
|
175
202
|
"owner()": {
|
|
@@ -180,25 +207,26 @@
|
|
|
180
207
|
"details": "The address that ownership of the contract is transferred to. This address may use {acceptOwnership()} to gain ownership of the contract."
|
|
181
208
|
},
|
|
182
209
|
"renounceOwnership()": {
|
|
183
|
-
"custom:danger": "Leaves the contract without an owner. Once ownership of the contract has been renounced, any functions that are restricted to be called by the owner will be permanently inaccessible, making these functions not callable anymore and unusable.",
|
|
210
|
+
"custom:danger": "Leaves the contract without an owner. Once ownership of the contract has been renounced, any functions that are restricted to be called by the owner or an address allowed by the owner will be permanently inaccessible, making these functions not callable anymore and unusable.",
|
|
184
211
|
"custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
|
|
185
212
|
"details": "Renounce ownership of the contract in a 2-step process. 1. The first call will initiate the process of renouncing ownership. 2. The second call is used as a confirmation and will leave the contract without an owner."
|
|
186
213
|
},
|
|
187
214
|
"setData(bytes32,bytes)": {
|
|
188
|
-
"custom:events": "- {
|
|
215
|
+
"custom:events": "- {UniversalReceiver} event when receiving native tokens. - {DataChanged} event.",
|
|
189
216
|
"custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
|
|
217
|
+
"details": "Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data.",
|
|
190
218
|
"params": {
|
|
191
|
-
"dataKey": "The key to
|
|
192
|
-
"dataValue": "The
|
|
219
|
+
"dataKey": "The data key for which to set a new value.",
|
|
220
|
+
"dataValue": "The new bytes value to set."
|
|
193
221
|
}
|
|
194
222
|
},
|
|
195
223
|
"setDataBatch(bytes32[],bytes[])": {
|
|
196
|
-
"custom:events": "- {
|
|
224
|
+
"custom:events": "- {UniversalReceiver} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
|
|
197
225
|
"custom:requirements": "Can be only called by the {owner} or by an authorised address that pass the verification check performed on the owner.",
|
|
198
|
-
"details": "
|
|
226
|
+
"details": "Batch data setting function that behaves the same as {setData} but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction.",
|
|
199
227
|
"params": {
|
|
200
|
-
"dataKeys": "
|
|
201
|
-
"dataValues": "
|
|
228
|
+
"dataKeys": "An array of data keys to set bytes values for.",
|
|
229
|
+
"dataValues": "An array of bytes values to set for each `dataKeys`."
|
|
202
230
|
}
|
|
203
231
|
},
|
|
204
232
|
"supportsInterface(bytes4)": {
|
|
@@ -218,7 +246,7 @@
|
|
|
218
246
|
}
|
|
219
247
|
},
|
|
220
248
|
"universalReceiver(bytes32,bytes)": {
|
|
221
|
-
"custom:events": "- {
|
|
249
|
+
"custom:events": "- {UniversalReceiver} when receiving native tokens. - {UniversalReceiver} event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.",
|
|
222
250
|
"details": "Achieves the goal of [LSP-1-UniversalReceiver] by allowing the account to be notified about incoming/outgoing transactions and enabling reactions to these actions. The reaction is achieved by having two external contracts ([LSP1UniversalReceiverDelegate]) that react on the whole transaction and on the specific typeId, respectively. The function performs the following steps: 1. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]. - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function. 2. Query the [ERC-725Y] storage with the data key [_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX] + `bytes32(typeId)`. (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) - If there is an address stored under the data key, check if this address supports the LSP1 interfaceId. - If yes, call this address with the typeId and data (params), along with additional calldata consisting of 20 bytes of `msg.sender` and 32 bytes of `msg.value`. If not, continue the execution of the function.",
|
|
223
251
|
"params": {
|
|
224
252
|
"receivedData": "The data received.",
|
|
@@ -227,6 +255,12 @@
|
|
|
227
255
|
"returns": {
|
|
228
256
|
"returnedValues": "The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call."
|
|
229
257
|
}
|
|
258
|
+
},
|
|
259
|
+
"version()": {
|
|
260
|
+
"details": "Get the version of the contract.",
|
|
261
|
+
"returns": {
|
|
262
|
+
"_0": "The version of the the contract."
|
|
263
|
+
}
|
|
230
264
|
}
|
|
231
265
|
},
|
|
232
266
|
"title": "Deployable Proxy Implementation of [LSP-0-ERC725Account] Standard.",
|
|
@@ -26,6 +26,19 @@
|
|
|
26
26
|
"details": "reverts when removing a guardian and the threshold is equal to the number of guardians"
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
|
+
"OwnableCallerNotTheOwner(address)": [
|
|
30
|
+
{
|
|
31
|
+
"details": "Reverts when only the owner is allowed to call the function.",
|
|
32
|
+
"params": {
|
|
33
|
+
"callerAddress": "The address that tried to make the call."
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"OwnableCannotSetZeroAddressAsOwner()": [
|
|
38
|
+
{
|
|
39
|
+
"details": "Reverts when trying to set `address(0)` as the contract owner when deploying the contract, initializing it or transferring ownership of the contract."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
29
42
|
"SecretHashCannotBeZero()": [
|
|
30
43
|
{
|
|
31
44
|
"details": "reverts when the secret hash provided is equal to bytes32(0)"
|
|
@@ -26,6 +26,19 @@
|
|
|
26
26
|
"details": "reverts when removing a guardian and the threshold is equal to the number of guardians"
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
|
+
"OwnableCallerNotTheOwner(address)": [
|
|
30
|
+
{
|
|
31
|
+
"details": "Reverts when only the owner is allowed to call the function.",
|
|
32
|
+
"params": {
|
|
33
|
+
"callerAddress": "The address that tried to make the call."
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"OwnableCannotSetZeroAddressAsOwner()": [
|
|
38
|
+
{
|
|
39
|
+
"details": "Reverts when trying to set `address(0)` as the contract owner when deploying the contract, initializing it or transferring ownership of the contract."
|
|
40
|
+
}
|
|
41
|
+
],
|
|
29
42
|
"SecretHashCannotBeZero()": [
|
|
30
43
|
{
|
|
31
44
|
"details": "reverts when the secret hash provided is equal to bytes32(0)"
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
"errors": {
|
|
4
4
|
"ContractInitializationFailed()": [
|
|
5
5
|
{
|
|
6
|
-
"details": "Reverts when there is no revert reason bubbled up by the contract
|
|
6
|
+
"details": "Reverts when there is no revert reason bubbled up by the created contract when initializing"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"InvalidValueSum()": [
|
|
10
10
|
{
|
|
11
|
-
"details": "Reverts when msg.value sent to {deployCreate2AndInitialize} function is not equal to the sum of the `initializeCalldataMsgValue` and `constructorMsgValue`"
|
|
11
|
+
"details": "Reverts when `msg.value` sent to {deployCreate2AndInitialize(..)} function is not equal to the sum of the `initializeCalldataMsgValue` and `constructorMsgValue`"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"events": {
|
|
16
16
|
"ContractCreated(address,bytes32,bytes32,bool,bytes)": {
|
|
17
|
-
"details": "Emitted whenever a contract is created",
|
|
17
|
+
"details": "Emitted whenever a contract is created.",
|
|
18
18
|
"params": {
|
|
19
|
-
"
|
|
20
|
-
"generatedSalt": "The salt used by the `CREATE2` opcode for contract deployment",
|
|
21
|
-
"initializeCalldata": "The bytes provided as initializeCalldata (Empty string when `initialized` is set to false)",
|
|
22
|
-
"initialized": "The Boolean that specifies if the contract must be initialized or not",
|
|
23
|
-
"providedSalt": "The salt provided by the deployer, which will be used to generate the final salt that will be used by the `CREATE2` opcode for contract deployment"
|
|
19
|
+
"createdContract": "The address of the contract created.",
|
|
20
|
+
"generatedSalt": "The salt used by the `CREATE2` opcode for contract deployment.",
|
|
21
|
+
"initializeCalldata": "The bytes provided as initializeCalldata (Empty string when `initialized` is set to false).",
|
|
22
|
+
"initialized": "The Boolean that specifies if the contract must be initialized or not.",
|
|
23
|
+
"providedSalt": "The salt provided by the deployer, which will be used to generate the final salt that will be used by the `CREATE2` opcode for contract deployment."
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
},
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
97
|
"generateSalt(bytes32,bool,bytes)": {
|
|
98
|
-
"details": "Generates the salt used to deploy the contract by hashing the following parameters (concatenated together) with keccak256:
|
|
98
|
+
"details": "Generates the salt used to deploy the contract by hashing the following parameters (concatenated together) with keccak256: 1. the `providedSalt` 2. the `initializable` boolean 3. the `initializeCalldata`, only if the contract is initializable (the `initializable` boolean is set to `true`) - The `providedSalt` parameter is not used directly as the salt by the CREATE2 opcode. Instead, it is used along with these parameters: 1. `initializable` boolean 2. `initializeCalldata` (when the contract is initializable and `initializable` is set to `true`). - This approach ensures that in order to reproduce an initializable contract at the same address on another chain, not only the `providedSalt` is required to be the same, but also the initialize parameters within the `initializeCalldata` must also be the same. This maintains consistent deployment behaviour. Users are required to initialize contracts with the same parameters across different chains to ensure contracts are deployed at the same address across different chains. 1. Example (for initializable contracts) - For an existing contract A on chain 1 owned by X, to replicate the same contract at the same address with the same owner X on chain 2, the salt used to generate the address should include the initializeCalldata that assigns X as the owner of contract A. - For instance, if another user, Y, tries to deploy the contract at the same address on chain 2 using the same providedSalt, but with a different initializeCalldata to make Y the owner instead of X, the generated address would be different, preventing Y from deploying the contract with different ownership at the same address. - However, for non-initializable contracts, if the constructor has arguments that specify the deployment behavior, they will be included in the bytecode. Any change in the constructor arguments will lead to a different contract's bytecode which will result in a different address on other chains. 2. Example (for non-initializable contracts) - If a contract is deployed with specific constructor arguments on chain 1, these arguments are embedded within the bytecode. For instance, if contract B is deployed with a specific `tokenName` and `tokenSymbol` on chain 1, and a user wants to deploy the same contract with the same `tokenName` and `tokenSymbol` on chain 2, they must use the same constructor arguments to produce the same bytecode. This ensures that the same deployment behaviour is maintained across different chains, as long as the same bytecode is used. - If another user Z, tries to deploy the same contract B at the same address on chain 2 using the same `providedSalt` but different constructor arguments (a different `tokenName` and/or `tokenSymbol`), the generated address will be different. This prevents user Z from deploying the contract with different constructor arguments at the same address on chain 2. - The providedSalt was hashed to produce the salt used by CREATE2 opcode to prevent users from deploying initializable contracts using non-initializable functions such as {deployCreate2} without having the initialization call. - In other words, if the providedSalt was not hashed and was used as it is as the salt by the CREATE2 opcode, malicious users can check the generated salt used for the already deployed initializable contract on chain 1, and deploy the contract from {deployCreate2} function on chain 2, with passing the generated salt of the deployed contract as providedSalt that will produce the same address but without the initialization, where the malicious user can initialize after.",
|
|
99
99
|
"params": {
|
|
100
100
|
"initializable": "The Boolean that specifies if the contract must be initialized or not",
|
|
101
101
|
"initializeCalldata": "The calldata to be executed on the created contract if `initializable` is set to `true`",
|
|
@@ -9,11 +9,6 @@
|
|
|
9
9
|
"caller": "The address of the EOA"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
],
|
|
13
|
-
"NativeTokensNotAccepted()": [
|
|
14
|
-
{
|
|
15
|
-
"details": "Reverts when the {universalReceiver} function in the LSP1 Universal Receiver Delegate contract is called while sending some native tokens along the call (`msg.value` different than `0`)"
|
|
16
|
-
}
|
|
17
12
|
]
|
|
18
13
|
},
|
|
19
14
|
"kind": "dev",
|
|
@@ -21,7 +16,7 @@
|
|
|
21
16
|
"supportsInterface(bytes4)": {
|
|
22
17
|
"details": "See {IERC165-supportsInterface}."
|
|
23
18
|
},
|
|
24
|
-
"
|
|
19
|
+
"universalReceiverDelegate(address,uint256,bytes32,bytes)": {
|
|
25
20
|
"custom:info": "- If some issues occured with generating the `dataKeys` or `dataValues` the `returnedMessage` will be an error message, otherwise it will be empty. - If an error occured when trying to use `setDataBatch(dataKeys,dataValues)`, it will return the raw error data back to the caller.",
|
|
26
21
|
"custom:requirements": "- This contract should be allowed to use the {setDataBatch(...)} function in order to update the LSP5 and LSP10 Data Keys. - Cannot accept native tokens",
|
|
27
22
|
"custom:warning": "When the data stored in the ERC725Y storage of the LSP0 contract is corrupted (_e.g: ([LSP-5-ReceivedAssets]'s Array length not 16 bytes long, the token received is already registered in `LSP5ReceivetAssets[]`, the token being sent is not sent as full balance, etc...), the function call will still pass and return (**not revert!**) and not modify any data key on the storage of the [LSP-0-ERC725Account].",
|
|
@@ -32,6 +27,12 @@
|
|
|
32
27
|
"returns": {
|
|
33
28
|
"_0": "The result of the reaction for `typeId`."
|
|
34
29
|
}
|
|
30
|
+
},
|
|
31
|
+
"version()": {
|
|
32
|
+
"details": "Get the version of the contract.",
|
|
33
|
+
"returns": {
|
|
34
|
+
"_0": "The version of the the contract."
|
|
35
|
+
}
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
"title": "Implementation of a UniversalReceiverDelegate for the [LSP-0-ERC725Account]",
|
|
@@ -9,11 +9,6 @@
|
|
|
9
9
|
"caller": "The address of the EOA"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
],
|
|
13
|
-
"NativeTokensNotAccepted()": [
|
|
14
|
-
{
|
|
15
|
-
"details": "Reverts when the {universalReceiver} function in the LSP1 Universal Receiver Delegate contract is called while sending some native tokens along the call (`msg.value` different than `0`)"
|
|
16
|
-
}
|
|
17
12
|
]
|
|
18
13
|
},
|
|
19
14
|
"kind": "dev",
|
|
@@ -21,7 +16,7 @@
|
|
|
21
16
|
"supportsInterface(bytes4)": {
|
|
22
17
|
"details": "See {IERC165-supportsInterface}."
|
|
23
18
|
},
|
|
24
|
-
"
|
|
19
|
+
"universalReceiverDelegate(address,uint256,bytes32,bytes)": {
|
|
25
20
|
"custom:info": "- If some issues occured with generating the `dataKeys` or `dataValues` the `returnedMessage` will be an error message, otherwise it will be empty. - If an error occured when trying to use `setDataBatch(dataKeys,dataValues)`, it will return the raw error data back to the caller.",
|
|
26
21
|
"custom:requirements": "Cannot accept native tokens.",
|
|
27
22
|
"details": "Handles two cases: Writes the received [LSP-7-DigitalAsset] or [LSP-8-IdentifiableDigitalAsset] assets into the vault storage according to the [LSP-5-ReceivedAssets] standard.",
|
|
@@ -31,6 +26,12 @@
|
|
|
31
26
|
"returns": {
|
|
32
27
|
"_0": "The result of the reaction for `typeId`."
|
|
33
28
|
}
|
|
29
|
+
},
|
|
30
|
+
"version()": {
|
|
31
|
+
"details": "Get the version of the contract.",
|
|
32
|
+
"returns": {
|
|
33
|
+
"_0": "The version of the the contract."
|
|
34
|
+
}
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
37
|
"title": "Implementation of a UniversalReceiverDelegate for the [LSP9Vault]",
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"errors": {
|
|
5
5
|
"ERC725Y_DataKeysValuesEmptyArray()": [
|
|
6
6
|
{
|
|
7
|
-
"details": "
|
|
7
|
+
"details": "Reverts when one of the array parameter provided to {setDataBatch} function is an empty array."
|
|
8
8
|
}
|
|
9
9
|
],
|
|
10
10
|
"ERC725Y_DataKeysValuesLengthMismatch()": [
|
|
11
11
|
{
|
|
12
|
-
"details": "
|
|
12
|
+
"details": "Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the {setDataBatch} function."
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"ERC725Y_MsgValueDisallowed()": [
|
|
16
16
|
{
|
|
17
|
-
"details": "
|
|
17
|
+
"details": "Reverts when sending value to the {setData} or {setDataBatch} function."
|
|
18
18
|
}
|
|
19
19
|
],
|
|
20
20
|
"LSP4TokenNameNotEditable()": [
|
|
@@ -26,6 +26,19 @@
|
|
|
26
26
|
{
|
|
27
27
|
"details": "Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed."
|
|
28
28
|
}
|
|
29
|
+
],
|
|
30
|
+
"OwnableCallerNotTheOwner(address)": [
|
|
31
|
+
{
|
|
32
|
+
"details": "Reverts when only the owner is allowed to call the function.",
|
|
33
|
+
"params": {
|
|
34
|
+
"callerAddress": "The address that tried to make the call."
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"OwnableCannotSetZeroAddressAsOwner()": [
|
|
39
|
+
{
|
|
40
|
+
"details": "Reverts when trying to set `address(0)` as the contract owner when deploying the contract, initializing it or transferring ownership of the contract."
|
|
41
|
+
}
|
|
29
42
|
]
|
|
30
43
|
},
|
|
31
44
|
"kind": "dev",
|
|
@@ -38,14 +51,16 @@
|
|
|
38
51
|
}
|
|
39
52
|
},
|
|
40
53
|
"getData(bytes32)": {
|
|
54
|
+
"details": "Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`.",
|
|
41
55
|
"params": {
|
|
42
|
-
"dataKey": "The key which
|
|
56
|
+
"dataKey": "The data key for which to retrieve the value."
|
|
43
57
|
},
|
|
44
58
|
"returns": {
|
|
45
|
-
"dataValue": "The
|
|
59
|
+
"dataValue": "The bytes value stored under the specified data key."
|
|
46
60
|
}
|
|
47
61
|
},
|
|
48
62
|
"getDataBatch(bytes32[])": {
|
|
63
|
+
"details": "Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`.",
|
|
49
64
|
"params": {
|
|
50
65
|
"dataKeys": "The array of keys which values to retrieve"
|
|
51
66
|
},
|
|
@@ -60,16 +75,23 @@
|
|
|
60
75
|
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
|
|
61
76
|
},
|
|
62
77
|
"setData(bytes32,bytes)": {
|
|
78
|
+
"custom:events": "{DataChanged} event.",
|
|
79
|
+
"custom:requirements": "- SHOULD only be callable by the {owner}.",
|
|
80
|
+
"custom:warning": "**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**.",
|
|
81
|
+
"details": "Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data.",
|
|
63
82
|
"params": {
|
|
64
|
-
"dataKey": "The key to
|
|
65
|
-
"dataValue": "The
|
|
83
|
+
"dataKey": "The data key for which to set a new value.",
|
|
84
|
+
"dataValue": "The new bytes value to set."
|
|
66
85
|
}
|
|
67
86
|
},
|
|
68
87
|
"setDataBatch(bytes32[],bytes[])": {
|
|
69
|
-
"
|
|
88
|
+
"custom:events": "{DataChanged} event **for each data key/value pair set**.",
|
|
89
|
+
"custom:requirements": "- SHOULD only be callable by the {owner} of the contract.",
|
|
90
|
+
"custom:warning": "**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**.",
|
|
91
|
+
"details": "Batch data setting function that behaves the same as {setData} but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction.",
|
|
70
92
|
"params": {
|
|
71
|
-
"dataKeys": "
|
|
72
|
-
"dataValues": "
|
|
93
|
+
"dataKeys": "An array of data keys to set bytes values for.",
|
|
94
|
+
"dataValues": "An array of bytes values to set for each `dataKeys`."
|
|
73
95
|
}
|
|
74
96
|
},
|
|
75
97
|
"supportsInterface(bytes4)": {
|