@lukso/lsp-smart-contracts 0.10.0 → 0.10.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 +14 -1
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +4 -4
- package/artifacts/LSP0ERC725AccountInit.json +4 -4
- package/artifacts/LSP11BasicSocialRecovery.json +2 -2
- package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
- package/artifacts/LSP16UniversalFactory.json +27 -21
- package/artifacts/LSP1UniversalReceiverDelegateUP.json +2 -2
- package/artifacts/LSP1UniversalReceiverDelegateVault.json +2 -2
- package/artifacts/LSP6KeyManager.json +2 -2
- package/artifacts/LSP6KeyManagerInit.json +2 -2
- package/artifacts/LSP7CompatibleERC20Mintable.json +2 -2
- package/artifacts/LSP7CompatibleERC20MintableInit.json +2 -2
- package/artifacts/LSP7Mintable.json +2 -2
- package/artifacts/LSP7MintableInit.json +2 -2
- package/artifacts/LSP8CompatibleERC721Mintable.json +2 -2
- package/artifacts/LSP8CompatibleERC721MintableInit.json +2 -2
- package/artifacts/LSP8Mintable.json +2 -2
- package/artifacts/LSP8MintableInit.json +2 -2
- package/artifacts/LSP9Vault.json +2 -2
- package/artifacts/LSP9VaultInit.json +2 -2
- package/artifacts/UniversalProfile.json +4 -4
- package/artifacts/UniversalProfileInit.json +4 -4
- package/artifacts/UniversalReceiverAddressStore.json +2 -2
- package/contracts/Factories/Create2Factory.sol +11 -3
- package/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol +13 -5
- package/contracts/LSP0ERC725Account/LSP0ERC725Account.sol +11 -6
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +256 -186
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +20 -6
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +23 -9
- package/contracts/LSP0ERC725Account/LSP0Utils.sol +3 -5
- package/contracts/LSP10ReceivedVaults/LSP10Utils.sol +25 -10
- package/contracts/LSP11BasicSocialRecovery/ILSP11BasicSocialRecovery.sol +4 -2
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecovery.sol +3 -1
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryCore.sol +65 -23
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInit.sol +7 -2
- package/contracts/LSP11BasicSocialRecovery/LSP11BasicSocialRecoveryInitAbstract.sol +14 -4
- package/contracts/LSP11BasicSocialRecovery/LSP11Errors.sol +4 -1
- package/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol +17 -16
- package/contracts/LSP14Ownable2Step/LSP14Errors.sol +4 -1
- package/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol +22 -11
- package/contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol +333 -128
- package/contracts/LSP17ContractExtension/LSP17Extendable.sol +38 -16
- package/contracts/LSP17ContractExtension/LSP17Extension.sol +20 -8
- package/contracts/LSP17ContractExtension/LSP17Utils.sol +4 -5
- package/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol +5 -5
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol +38 -14
- package/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol +31 -11
- package/contracts/LSP1UniversalReceiver/LSP1Utils.sol +34 -9
- package/contracts/LSP20CallVerification/{ILSP20CallVerification.sol → ILSP20CallVerifier.sol} +7 -2
- package/contracts/LSP20CallVerification/LSP20CallVerification.sol +24 -9
- package/contracts/LSP20CallVerification/LSP20Errors.sol +1 -1
- package/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol +62 -36
- package/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol +3 -1
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol +15 -4
- package/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol +18 -5
- package/contracts/LSP5ReceivedAssets/LSP5Utils.sol +32 -12
- package/contracts/LSP6KeyManager/ILSP6KeyManager.sol +17 -8
- package/contracts/LSP6KeyManager/LSP6Constants.sol +3 -9
- package/contracts/LSP6KeyManager/LSP6Errors.sol +4 -1
- package/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol +114 -72
- package/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol +7 -2
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol +96 -46
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol +10 -5
- package/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol +98 -32
- package/contracts/LSP6KeyManager/LSP6Utils.sol +42 -34
- package/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +8 -6
- package/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol +13 -10
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +96 -26
- package/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol +11 -9
- package/contracts/LSP7DigitalAsset/LSP7Errors.sol +8 -2
- package/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol +9 -2
- package/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol +1 -5
- package/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol +4 -6
- package/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +6 -2
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +32 -12
- package/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +28 -7
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol +8 -2
- package/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +6 -2
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol +6 -1
- package/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +13 -3
- package/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +14 -5
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol +12 -10
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +95 -28
- package/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol +14 -10
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol +23 -10
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +6 -2
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +72 -30
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +77 -27
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +6 -2
- package/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +6 -2
- package/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol +8 -2
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +6 -2
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +3 -1
- package/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +5 -1
- package/contracts/LSP9Vault/ILSP9Vault.sol +13 -5
- package/contracts/LSP9Vault/LSP9Vault.sol +7 -2
- package/contracts/LSP9Vault/LSP9VaultCore.sol +108 -51
- package/contracts/LSP9Vault/LSP9VaultInitAbstract.sol +10 -3
- package/contracts/Legacy/Registries/AddressRegistry.sol +13 -4
- package/contracts/Legacy/Registries/AddressRegistryRequiresERC725.sol +6 -2
- package/contracts/Legacy/UniversalReceiverAddressStore.sol +17 -6
- package/contracts/UniversalProfile.sol +14 -5
- package/contracts/UniversalProfileInit.sol +17 -5
- package/contracts/UniversalProfileInitAbstract.sol +17 -9
- package/devdocs/LSP0ERC725Account.json +33 -19
- package/devdocs/LSP0ERC725AccountInit.json +33 -20
- package/devdocs/LSP16UniversalFactory.json +87 -22
- package/devdocs/LSP9Vault.json +3 -3
- package/devdocs/LSP9VaultInit.json +3 -3
- package/devdocs/UniversalProfile.json +32 -18
- package/devdocs/UniversalProfileInit.json +33 -19
- package/dist/constants.cjs.js +310 -182
- package/dist/constants.d.ts +178 -48
- package/dist/constants.es.js +310 -182
- package/package.json +19 -17
- package/userdocs/LSP0ERC725Account.json +5 -2
- package/userdocs/LSP0ERC725AccountInit.json +8 -2
- package/userdocs/UniversalProfile.json +3 -3
- package/userdocs/UniversalProfileInit.json +6 -3
- package/contracts/Custom/EIP191Signer.sol +0 -12
|
@@ -1,51 +1,116 @@
|
|
|
1
1
|
{
|
|
2
|
-
"details": "
|
|
2
|
+
"details": "Factory contract to deploy different types of contracts using the CREATE2 opcode standardized as LSP16 - UniversalFactory: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-16-UniversalFactory.md The UniversalFactory will be deployed using Nick's Factory (0x4e59b44847b379578588920ca78fbf26c0b4956c) The deployed address can be found in the LSP16 specification. Please refer to the LSP16 Specification to obtain the exact bytecode and salt that should be used to produce the address of the UniversalFactory on different chains. This factory contract is designed to deploy contracts at the same address on multiple chains. The UniversalFactory can deploy 2 types of contracts: - non-initializable (normal deployment) - initializable (external call after deployment, e.g: proxy contracts) The `providedSalt` parameter given by the deployer is not used directly as the salt by the CREATE2 opcode. Instead, it is used along with these parameters: - `initializable` boolean - `initializeCalldata` (when the contract is initializable and `initializable` is set to `true`). These three parameters are concatenated together and hashed to generate the final salt for CREATE2. See {generateSalt} function for more details. The constructor and `initializeCalldata` SHOULD NOT include any network-specific parameters (e.g: chain-id, a local token contract address), otherwise the deployed contract will not be recreated at the same address across different networks, thus defeating the purpose of the UniversalFactory. One way to solve this problem is to set an EOA owner in the `initializeCalldata`/constructor that can later call functions that set these parameters as variables in the contract. The UniversalFactory must be deployed at the same address on different chains to successfully deploy contracts at the same address across different chains.",
|
|
3
3
|
"errors": {
|
|
4
|
-
"
|
|
4
|
+
"ContractInitializationFailed()": [
|
|
5
5
|
{
|
|
6
|
-
"details": "
|
|
6
|
+
"details": "Reverts when there is no revert reason bubbled up by the contract created when initializing"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
|
-
"
|
|
9
|
+
"InvalidValueSum()": [
|
|
10
10
|
{
|
|
11
|
-
"details": "
|
|
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
|
-
"ContractCreated(address,bytes32,bool,bytes)": {
|
|
16
|
+
"ContractCreated(address,bytes32,bytes32,bool,bytes)": {
|
|
17
17
|
"details": "Emitted whenever a contract is created",
|
|
18
18
|
"params": {
|
|
19
19
|
"contractCreated": "The address of the contract created",
|
|
20
|
-
"
|
|
21
|
-
"initializeCalldata": "The bytes provided as initializeCalldata",
|
|
22
|
-
"
|
|
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"
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
"kind": "dev",
|
|
27
28
|
"methods": {
|
|
28
|
-
"
|
|
29
|
-
"details": "
|
|
29
|
+
"computeAddress(bytes32,bytes32,bool,bytes)": {
|
|
30
|
+
"details": "Computes the address of a contract to be deployed using CREATE2, based on the input parameters. Any change in one of these parameters will result in a different address. When the `initializable` boolean is set to `false`, `initializeCalldata` will not affect the function output.",
|
|
31
|
+
"params": {
|
|
32
|
+
"byteCodeHash": "The keccak256 hash of the bytecode to be deployed",
|
|
33
|
+
"initializable": "A boolean that indicates whether an external call should be made to initialize the contract after deployment",
|
|
34
|
+
"initializeCalldata": "The calldata to be executed on the created contract if `initializable` is set to `true`",
|
|
35
|
+
"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"
|
|
36
|
+
},
|
|
37
|
+
"returns": {
|
|
38
|
+
"_0": "The address where the contract will be deployed"
|
|
39
|
+
}
|
|
30
40
|
},
|
|
31
|
-
"
|
|
32
|
-
"details": "
|
|
41
|
+
"computeERC1167Address(address,bytes32,bool,bytes)": {
|
|
42
|
+
"details": "Computes the address of an ERC1167 proxy contract based on the input parameters. Any change in one of these parameters will result in a different address. When the `initializable` boolean is set to `false`, `initializeCalldata` will not affect the function output.",
|
|
43
|
+
"params": {
|
|
44
|
+
"implementationContract": "The contract to create a clone of according to ERC1167",
|
|
45
|
+
"initializable": "A boolean that indicates whether an external call should be made to initialize the proxy contract after deployment",
|
|
46
|
+
"initializeCalldata": "The calldata to be executed on the created contract if `initializable` is set to `true`",
|
|
47
|
+
"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"
|
|
48
|
+
},
|
|
49
|
+
"returns": {
|
|
50
|
+
"_0": "The address where the ERC1167 proxy contract will be deployed"
|
|
51
|
+
}
|
|
33
52
|
},
|
|
34
53
|
"deployCreate2(bytes,bytes32)": {
|
|
35
|
-
"details": "Deploys a contract using
|
|
54
|
+
"details": "Deploys a contract using the CREATE2 opcode. The address where the contract will be deployed can be known in advance via the {computeAddress} function. This function deploys contracts without initialization (external call after deployment). The `providedSalt` parameter is not used directly as the salt by the CREATE2 opcode. Instead, it is hashed with keccak256: `keccak256(abi.encodePacked(false, providedSalt))`. See {generateSalt} function for more details. Using the same `byteCode` and `providedSalt` multiple times will revert, as the contract cannot be deployed twice at the same address. If the constructor of the contract to deploy is payable, value can be sent to this function to fund the created contract. However, sending value to this function while the constructor is not payable will result in a revert.",
|
|
55
|
+
"params": {
|
|
56
|
+
"byteCode": "The bytecode of the contract to be deployed",
|
|
57
|
+
"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"
|
|
58
|
+
},
|
|
59
|
+
"returns": {
|
|
60
|
+
"_0": "The address of the deployed contract"
|
|
61
|
+
}
|
|
36
62
|
},
|
|
37
|
-
"
|
|
38
|
-
"details": "Deploys a contract using
|
|
63
|
+
"deployCreate2AndInitialize(bytes,bytes32,bytes,uint256,uint256)": {
|
|
64
|
+
"details": "Deploys a contract using the CREATE2 opcode. The address where the contract will be deployed can be known in advance via the {computeAddress} function. This function deploys contracts with initialization (external call after deployment). The `providedSalt` parameter is not used directly as the salt by the CREATE2 opcode. Instead, it is hashed with keccak256: `keccak256(abi.encodePacked(true, initializeCalldata, providedSalt))`. See {generateSalt} function for more details. Using the same `byteCode`, `providedSalt` and `initializeCalldata` multiple times will revert, as the contract cannot be deployed twice at the same address. If the constructor or the initialize function of the contract to deploy is payable, value can be sent along with the deployment/initialization to fund the created contract. However, sending value to this function while the constructor/initialize function is not payable will result in a revert. Will revert if the `msg.value` sent to the function is not equal to the sum of `constructorMsgValue` and `initializeCalldataMsgValue`.",
|
|
65
|
+
"params": {
|
|
66
|
+
"byteCode": "The bytecode of the contract to be deployed",
|
|
67
|
+
"constructorMsgValue": "The value sent to the contract during deployment",
|
|
68
|
+
"initializeCalldata": "The calldata to be executed on the created contract",
|
|
69
|
+
"initializeCalldataMsgValue": "The value sent to the contract during initialization",
|
|
70
|
+
"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"
|
|
71
|
+
},
|
|
72
|
+
"returns": {
|
|
73
|
+
"_0": "The address of the deployed contract"
|
|
74
|
+
}
|
|
39
75
|
},
|
|
40
|
-
"
|
|
41
|
-
"details": "Deploys
|
|
76
|
+
"deployERC1167Proxy(address,bytes32)": {
|
|
77
|
+
"details": "Deploys an ERC1167 minimal proxy contract using the CREATE2 opcode. The address where the contract will be deployed can be known in advance via the {computeERC1167Address} function. This function deploys contracts without initialization (external call after deployment). The `providedSalt` parameter is not used directly as the salt by the CREATE2 opcode. Instead, it is hashed with keccak256: `keccak256(abi.encodePacked(false, providedSalt))`. See {generateSalt} function for more details. See {generateSalt} function for more details. Using the same `implementationContract` and `providedSalt` multiple times will revert, as the contract cannot be deployed twice at the same address. Sending value to the contract created is not possible since the constructor of the ERC1167 minimal proxy is not payable.",
|
|
78
|
+
"params": {
|
|
79
|
+
"implementationContract": "The contract address to use as the base implementation behind the proxy that will be deployed",
|
|
80
|
+
"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"
|
|
81
|
+
},
|
|
82
|
+
"returns": {
|
|
83
|
+
"_0": "The address of the minimal proxy deployed"
|
|
84
|
+
}
|
|
42
85
|
},
|
|
43
|
-
"
|
|
44
|
-
"details": "Deploys
|
|
86
|
+
"deployERC1167ProxyAndInitialize(address,bytes32,bytes)": {
|
|
87
|
+
"details": "Deploys an ERC1167 minimal proxy contract using the CREATE2 opcode. The address where the contract will be deployed can be known in advance via the {computeERC1167Address} function. This function deploys contracts with initialization (external call after deployment). The `providedSalt` parameter is not used directly as the salt by the CREATE2 opcode. Instead, it is hashed with keccak256: `keccak256(abi.encodePacked(true, initializeCalldata, providedSalt))`. See {generateSalt} function for more details. Using the same `implementationContract`, `providedSalt` and `initializeCalldata` multiple times will revert, as the contract cannot be deployed twice at the same address. If the initialize function of the contract to deploy is payable, value can be sent along to fund the created contract while initializing. However, sending value to this function while the initialize function is not payable will result in a revert.",
|
|
88
|
+
"params": {
|
|
89
|
+
"implementationContract": "The contract address to use as the base implementation behind the proxy that will be deployed",
|
|
90
|
+
"initializeCalldata": "The calldata to be executed on the created contract",
|
|
91
|
+
"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"
|
|
92
|
+
},
|
|
93
|
+
"returns": {
|
|
94
|
+
"_0": "The address of the minimal proxy deployed"
|
|
95
|
+
}
|
|
45
96
|
},
|
|
46
|
-
"generateSalt(bool,bytes
|
|
47
|
-
"details": "
|
|
97
|
+
"generateSalt(bytes32,bool,bytes)": {
|
|
98
|
+
"details": "Generates the salt used to deploy the contract by hashing the following parameters (concatenated together) with keccak256: - the `providedSalt` - the `initializable` boolean - 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: - `initializable` boolean - `initializeCalldata` (when the contract is initializable and `initializable` is set to `true`). These three parameters are concatenated together and hashed to generate the final salt for CREATE2. 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. ----------- 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. ----------- 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
|
+
"params": {
|
|
100
|
+
"initializable": "The Boolean that specifies if the contract must be initialized or not",
|
|
101
|
+
"initializeCalldata": "The calldata to be executed on the created contract if `initializable` is set to `true`",
|
|
102
|
+
"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"
|
|
103
|
+
},
|
|
104
|
+
"returns": {
|
|
105
|
+
"_0": "The generated salt which will be used for CREATE2 deployment"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"stateVariables": {
|
|
110
|
+
"_EMPTY_BYTE": {
|
|
111
|
+
"details": "placeholder for the `initializeCallData` param when the `initializable` boolean is set to `false`."
|
|
48
112
|
}
|
|
49
113
|
},
|
|
114
|
+
"title": "LSP16 Universal Factory",
|
|
50
115
|
"version": 1
|
|
51
116
|
}
|
package/devdocs/LSP9Vault.json
CHANGED
|
@@ -128,10 +128,10 @@
|
|
|
128
128
|
"details": "Returns the address of the current owner."
|
|
129
129
|
},
|
|
130
130
|
"pendingOwner()": {
|
|
131
|
-
"details": "The address that ownership of the contract is transferred to. This address may use
|
|
131
|
+
"details": "The address that ownership of the contract is transferred to. This address may use {acceptOwnership()} to gain ownership of the contract."
|
|
132
132
|
},
|
|
133
133
|
"renounceOwnership()": {
|
|
134
|
-
"details": "Renounce ownership of the contract in a
|
|
134
|
+
"details": "Renounce ownership of the contract in a two step process. 1. the first call will initiate the process of renouncing ownership. 2. the second is used as a confirmation and will leave the contract without an owner."
|
|
135
135
|
},
|
|
136
136
|
"setData(bytes32,bytes)": {
|
|
137
137
|
"details": "Sets data as bytes in the vault storage for a single key. SHOULD only be callable by the owner of the contract set via ERC173 and the UniversalReceiverDelegate Emits a {DataChanged} event.",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"transferOwnership(address)": {
|
|
154
154
|
"details": "same as ILSP14.transferOwnership with the additional requirement: Requirements: - when notifying the new owner via LSP1, the typeId used MUST be keccak256('LSP9OwnershipTransferStarted')",
|
|
155
155
|
"params": {
|
|
156
|
-
"newOwner": "the address of the new owner.
|
|
156
|
+
"newOwner": "the address of the new owner."
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
"universalReceiver(bytes32,bytes)": {
|
|
@@ -132,10 +132,10 @@
|
|
|
132
132
|
"details": "Returns the address of the current owner."
|
|
133
133
|
},
|
|
134
134
|
"pendingOwner()": {
|
|
135
|
-
"details": "The address that ownership of the contract is transferred to. This address may use
|
|
135
|
+
"details": "The address that ownership of the contract is transferred to. This address may use {acceptOwnership()} to gain ownership of the contract."
|
|
136
136
|
},
|
|
137
137
|
"renounceOwnership()": {
|
|
138
|
-
"details": "Renounce ownership of the contract in a
|
|
138
|
+
"details": "Renounce ownership of the contract in a two step process. 1. the first call will initiate the process of renouncing ownership. 2. the second is used as a confirmation and will leave the contract without an owner."
|
|
139
139
|
},
|
|
140
140
|
"setData(bytes32,bytes)": {
|
|
141
141
|
"details": "Sets data as bytes in the vault storage for a single key. SHOULD only be callable by the owner of the contract set via ERC173 and the UniversalReceiverDelegate Emits a {DataChanged} event.",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"transferOwnership(address)": {
|
|
158
158
|
"details": "same as ILSP14.transferOwnership with the additional requirement: Requirements: - when notifying the new owner via LSP1, the typeId used MUST be keccak256('LSP9OwnershipTransferStarted')",
|
|
159
159
|
"params": {
|
|
160
|
-
"newOwner": "the address of the new owner.
|
|
160
|
+
"newOwner": "the address of the new owner."
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
"universalReceiver(bytes32,bytes)": {
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
{
|
|
74
74
|
"details": "reverts when the call to the owner does not return the magic value",
|
|
75
75
|
"params": {
|
|
76
|
-
"postCall": "
|
|
76
|
+
"postCall": "True if the execution call was done, False otherwise",
|
|
77
|
+
"returnedData": "The data returned by the call to the logic verifier"
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
],
|
|
@@ -91,7 +92,8 @@
|
|
|
91
92
|
"kind": "dev",
|
|
92
93
|
"methods": {
|
|
93
94
|
"acceptOwnership()": {
|
|
94
|
-
"
|
|
95
|
+
"custom:requirements": "- MUST be called by the pendingOwner. - When notifying the previous owner via LSP1, the typeId used MUST be `keccak256('LSP0OwnershipTransferred_SenderNotification')`. - When notifying the new owner via LSP1, the typeId used MUST be `keccak256('LSP0OwnershipTransferred_RecipientNotification')`.",
|
|
96
|
+
"details": "Transfer ownership of the contract from the current {`owner()`} to the {`pendingOwner()`}. Once this function is called: - the current {`owner()`} will loose access to the functions restricted to the {`owner()`} only. - the {`pendingOwner()`} will gain access to the functions restricted to the {`owner()`} only."
|
|
95
97
|
},
|
|
96
98
|
"batchCalls(bytes[])": {
|
|
97
99
|
"details": "Allows a caller to batch different function calls in one call. Perform a delegatecall on self, to call different functions with preserving the context It is not possible to send value along the functions call due to the use of delegatecall.",
|
|
@@ -103,26 +105,31 @@
|
|
|
103
105
|
}
|
|
104
106
|
},
|
|
105
107
|
"constructor": {
|
|
108
|
+
"details": "Set `initialOwner` as the contract owner and set the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `constructor` also allows funding the contract on deployment. Emitted Events: - ValueReceived: when the contract is funded on deployment.",
|
|
106
109
|
"params": {
|
|
107
|
-
"
|
|
110
|
+
"initialOwner": "the owner of the contract"
|
|
108
111
|
}
|
|
109
112
|
},
|
|
110
113
|
"execute(uint256,address,uint256,bytes)": {
|
|
114
|
+
"custom:events": "- {Executed} event, when a call is executed under `operationType` 0, 3 and 4 - {ContractCreated} event, when a contract is created under `operationType` 1 and 2 - {ValueReceived} event when receiving native tokens.",
|
|
115
|
+
"custom:requirements": "- if a `value` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is `STATICCALL` or `DELEGATECALL`, `value` SHOULD be 0. - `target` SHOULD be `address(0)` when deploying a contract. - MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
111
116
|
"details": "Executes any call on other addresses.",
|
|
112
117
|
"params": {
|
|
113
|
-
"data": "The call data to execute on `target`, or the bytecode of the contract to deploy
|
|
114
|
-
"operationType": "The operation to execute: CALL = 0 CREATE = 1 CREATE2 = 2 STATICCALL = 3 DELEGATECALL = 4",
|
|
115
|
-
"target": "The address (smart contract/EOA) to interact with, `target` will be unused if a contract is created (
|
|
118
|
+
"data": "The call data to execute on `target`, or the bytecode of the contract to deploy.",
|
|
119
|
+
"operationType": "The operation to execute: `CALL = 0`, `CREATE = 1` `CREATE2 = 2`, `STATICCALL = 3`, `DELEGATECALL = 4`.",
|
|
120
|
+
"target": "The address (smart contract/EOA) to interact with, `target` will be unused if a contract is created (`CREATE` & `CREATE2`).",
|
|
116
121
|
"value": "The amount of native tokens to transfer (in Wei)."
|
|
117
122
|
}
|
|
118
123
|
},
|
|
119
124
|
"executeBatch(uint256[],address[],uint256[],bytes[])": {
|
|
125
|
+
"custom:events": "- {Executed} event, when a call is executed under `operationType` 0, 3 and 4 (each iteration) - {ContractCreated} event, when a contract is created under `operationType` 1 and 2 (each iteration) - {ValueReceived} event when receiving native tokens.",
|
|
126
|
+
"custom:requirements": "- The length of the parameters provided MUST be equal - if a `value` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is `STATICCALL` or `DELEGATECALL`, `value` SHOULD be 0. - `target` SHOULD be `address(0)` when deploying a contract. - MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
120
127
|
"details": "Generic batch executor function that executes any call on other addresses",
|
|
121
128
|
"params": {
|
|
122
|
-
"datas": "The list of call data to execute on `targets`, or the creation bytecode of the contracts to deploy
|
|
123
|
-
"operationsType": "The list of operations type used: CALL = 0
|
|
124
|
-
"targets": "The list of addresses to call. `targets` will be unused if a contract is created (
|
|
125
|
-
"values": "The list of native token amounts to transfer (in Wei)"
|
|
129
|
+
"datas": "The list of call data to execute on `targets`, or the creation bytecode of the contracts to deploy.",
|
|
130
|
+
"operationsType": "The list of operations type used: `CALL = 0`, `CREATE = 1`, `CREATE2 = 2`, `STATICCALL = 3`, `DELEGATECALL = 4`.",
|
|
131
|
+
"targets": "The list of addresses to call. `targets` will be unused if a contract is created (`CREATE` & `CREATE2`).",
|
|
132
|
+
"values": "The list of native token amounts to transfer (in Wei)."
|
|
126
133
|
}
|
|
127
134
|
},
|
|
128
135
|
"getData(bytes32)": {
|
|
@@ -142,7 +149,7 @@
|
|
|
142
149
|
}
|
|
143
150
|
},
|
|
144
151
|
"isValidSignature(bytes32,bytes)": {
|
|
145
|
-
"details": "Handles two cases:
|
|
152
|
+
"details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the magicValue 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 fail value 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 fail value, the {isValidSignature()} on the account returns the fail value, indicating that the signature is not valid. - If the {isValidSignature()} on the owner returned the magicValue, the {isValidSignature()} on the account returns the magicValue, indicating that it's a valid signature.",
|
|
146
153
|
"params": {
|
|
147
154
|
"dataHash": "The hash of the data to be validated.",
|
|
148
155
|
"signature": "A signature that can validate the previous parameter (Hash)."
|
|
@@ -155,36 +162,43 @@
|
|
|
155
162
|
"details": "Returns the address of the current owner."
|
|
156
163
|
},
|
|
157
164
|
"pendingOwner()": {
|
|
158
|
-
"details": "The address that ownership of the contract is transferred to. This address may use
|
|
165
|
+
"details": "The address that ownership of the contract is transferred to. This address may use {acceptOwnership()} to gain ownership of the contract."
|
|
159
166
|
},
|
|
160
167
|
"renounceOwnership()": {
|
|
161
|
-
"
|
|
168
|
+
"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.",
|
|
169
|
+
"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 is used as a confirmation and will leave the contract without an owner. MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification"
|
|
162
170
|
},
|
|
163
171
|
"setData(bytes32,bytes)": {
|
|
172
|
+
"custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event.",
|
|
173
|
+
"custom:requirements": "- MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
164
174
|
"details": "Sets singular data for a given `dataKey`",
|
|
165
175
|
"params": {
|
|
166
176
|
"dataKey": "The key to retrieve stored value",
|
|
167
|
-
"dataValue": "The value to set
|
|
177
|
+
"dataValue": "The value to set"
|
|
168
178
|
}
|
|
169
179
|
},
|
|
170
180
|
"setDataBatch(bytes32[],bytes[])": {
|
|
181
|
+
"custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
|
|
182
|
+
"custom:requirements": "- MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
171
183
|
"details": "Sets array of data for multiple given `dataKeys`",
|
|
172
184
|
"params": {
|
|
173
185
|
"dataKeys": "The array of data keys for values to set",
|
|
174
|
-
"dataValues": "The array of values to set
|
|
186
|
+
"dataValues": "The array of values to set"
|
|
175
187
|
}
|
|
176
188
|
},
|
|
177
189
|
"supportsInterface(bytes4)": {
|
|
178
190
|
"details": "Returns true if this contract implements the interface defined by `interfaceId`. If the contract doesn't support the `interfaceId`, it forwards the call to the `supportsInterface` extension according to LSP17, and checks if the extension implements the interface defined by `interfaceId`."
|
|
179
191
|
},
|
|
180
192
|
"transferOwnership(address)": {
|
|
181
|
-
"
|
|
193
|
+
"custom:requirements": "- MUST pass when called by the owner or by an authorized address that passes the verification check performed on the owner according to [LSP20-CallVerification] specification. - When notifying the new owner via LSP1, the `typeId` used MUST be `keccak256('LSP0OwnershipTransferStarted')`. - Pending owner cannot accept ownership in the same tx via the LSP1 hook.",
|
|
194
|
+
"details": "Sets the address of the `pendingNewOwner` as a pending owner that should call {`acceptOwnership()`} in order to complete the ownership transfer to become the new {`owner()`} of the account. Notifies the pending owner via LSP1Standard by calling {universalReceiver()} on the pending owner if it's an address that supports LSP1.",
|
|
182
195
|
"params": {
|
|
183
|
-
"
|
|
196
|
+
"pendingNewOwner": "The address of the new pending owner."
|
|
184
197
|
}
|
|
185
198
|
},
|
|
186
199
|
"universalReceiver(bytes32,bytes)": {
|
|
187
|
-
"
|
|
200
|
+
"custom:events": "- {ValueReceived} when receiving native tokens. - {UniversalReceiver} event.",
|
|
201
|
+
"details": "The function performs the following steps: 1. Query the ERC725Y 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 ERC725Y storage with the data key `[_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY] + <bytes32 typeId>`. (Check [LSP2-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.",
|
|
188
202
|
"params": {
|
|
189
203
|
"receivedData": "The data received.",
|
|
190
204
|
"typeId": "The type of call received."
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
{
|
|
74
74
|
"details": "reverts when the call to the owner does not return the magic value",
|
|
75
75
|
"params": {
|
|
76
|
-
"postCall": "
|
|
76
|
+
"postCall": "True if the execution call was done, False otherwise",
|
|
77
|
+
"returnedData": "The data returned by the call to the logic verifier"
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
],
|
|
@@ -91,7 +92,8 @@
|
|
|
91
92
|
"kind": "dev",
|
|
92
93
|
"methods": {
|
|
93
94
|
"acceptOwnership()": {
|
|
94
|
-
"
|
|
95
|
+
"custom:requirements": "- MUST be called by the pendingOwner. - When notifying the previous owner via LSP1, the typeId used MUST be `keccak256('LSP0OwnershipTransferred_SenderNotification')`. - When notifying the new owner via LSP1, the typeId used MUST be `keccak256('LSP0OwnershipTransferred_RecipientNotification')`.",
|
|
96
|
+
"details": "Transfer ownership of the contract from the current {`owner()`} to the {`pendingOwner()`}. Once this function is called: - the current {`owner()`} will loose access to the functions restricted to the {`owner()`} only. - the {`pendingOwner()`} will gain access to the functions restricted to the {`owner()`} only."
|
|
95
97
|
},
|
|
96
98
|
"batchCalls(bytes[])": {
|
|
97
99
|
"details": "Allows a caller to batch different function calls in one call. Perform a delegatecall on self, to call different functions with preserving the context It is not possible to send value along the functions call due to the use of delegatecall.",
|
|
@@ -103,24 +105,28 @@
|
|
|
103
105
|
}
|
|
104
106
|
},
|
|
105
107
|
"constructor": {
|
|
106
|
-
"details": "
|
|
108
|
+
"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."
|
|
107
109
|
},
|
|
108
110
|
"execute(uint256,address,uint256,bytes)": {
|
|
111
|
+
"custom:events": "- {Executed} event, when a call is executed under `operationType` 0, 3 and 4 - {ContractCreated} event, when a contract is created under `operationType` 1 and 2 - {ValueReceived} event when receiving native tokens.",
|
|
112
|
+
"custom:requirements": "- if a `value` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is `STATICCALL` or `DELEGATECALL`, `value` SHOULD be 0. - `target` SHOULD be `address(0)` when deploying a contract. - MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
109
113
|
"details": "Executes any call on other addresses.",
|
|
110
114
|
"params": {
|
|
111
|
-
"data": "The call data to execute on `target`, or the bytecode of the contract to deploy
|
|
112
|
-
"operationType": "The operation to execute: CALL = 0 CREATE = 1 CREATE2 = 2 STATICCALL = 3 DELEGATECALL = 4",
|
|
113
|
-
"target": "The address (smart contract/EOA) to interact with, `target` will be unused if a contract is created (
|
|
115
|
+
"data": "The call data to execute on `target`, or the bytecode of the contract to deploy.",
|
|
116
|
+
"operationType": "The operation to execute: `CALL = 0`, `CREATE = 1` `CREATE2 = 2`, `STATICCALL = 3`, `DELEGATECALL = 4`.",
|
|
117
|
+
"target": "The address (smart contract/EOA) to interact with, `target` will be unused if a contract is created (`CREATE` & `CREATE2`).",
|
|
114
118
|
"value": "The amount of native tokens to transfer (in Wei)."
|
|
115
119
|
}
|
|
116
120
|
},
|
|
117
121
|
"executeBatch(uint256[],address[],uint256[],bytes[])": {
|
|
122
|
+
"custom:events": "- {Executed} event, when a call is executed under `operationType` 0, 3 and 4 (each iteration) - {ContractCreated} event, when a contract is created under `operationType` 1 and 2 (each iteration) - {ValueReceived} event when receiving native tokens.",
|
|
123
|
+
"custom:requirements": "- The length of the parameters provided MUST be equal - if a `value` is provided, the contract MUST have at least this amount in its balance to execute successfully. - if the operation type is `STATICCALL` or `DELEGATECALL`, `value` SHOULD be 0. - `target` SHOULD be `address(0)` when deploying a contract. - MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
118
124
|
"details": "Generic batch executor function that executes any call on other addresses",
|
|
119
125
|
"params": {
|
|
120
|
-
"datas": "The list of call data to execute on `targets`, or the creation bytecode of the contracts to deploy
|
|
121
|
-
"operationsType": "The list of operations type used: CALL = 0
|
|
122
|
-
"targets": "The list of addresses to call. `targets` will be unused if a contract is created (
|
|
123
|
-
"values": "The list of native token amounts to transfer (in Wei)"
|
|
126
|
+
"datas": "The list of call data to execute on `targets`, or the creation bytecode of the contracts to deploy.",
|
|
127
|
+
"operationsType": "The list of operations type used: `CALL = 0`, `CREATE = 1`, `CREATE2 = 2`, `STATICCALL = 3`, `DELEGATECALL = 4`.",
|
|
128
|
+
"targets": "The list of addresses to call. `targets` will be unused if a contract is created (`CREATE` & `CREATE2`).",
|
|
129
|
+
"values": "The list of native token amounts to transfer (in Wei)."
|
|
124
130
|
}
|
|
125
131
|
},
|
|
126
132
|
"getData(bytes32)": {
|
|
@@ -140,12 +146,13 @@
|
|
|
140
146
|
}
|
|
141
147
|
},
|
|
142
148
|
"initialize(address)": {
|
|
149
|
+
"details": "Set `initialOwner` as the contract owner and set the `SupportedStandards:LSP3UniversalProfile` data key in the ERC725Y data key/value store. The `initialOwner` will then be allowed to call protected functions marked with the `onlyOwner` modifier. The `initialize(address)` function also allows funding the contract on initialization. Emitted Events: - ValueReceived: when the contract is funded on initialization.",
|
|
143
150
|
"params": {
|
|
144
|
-
"
|
|
151
|
+
"initialOwner": "the owner of the contract"
|
|
145
152
|
}
|
|
146
153
|
},
|
|
147
154
|
"isValidSignature(bytes32,bytes)": {
|
|
148
|
-
"details": "Handles two cases:
|
|
155
|
+
"details": "Handles two cases: 1. If the owner is an EOA, recovers an address from the hash and the signature provided: - Returns the magicValue 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 fail value 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 fail value, the {isValidSignature()} on the account returns the fail value, indicating that the signature is not valid. - If the {isValidSignature()} on the owner returned the magicValue, the {isValidSignature()} on the account returns the magicValue, indicating that it's a valid signature.",
|
|
149
156
|
"params": {
|
|
150
157
|
"dataHash": "The hash of the data to be validated.",
|
|
151
158
|
"signature": "A signature that can validate the previous parameter (Hash)."
|
|
@@ -158,36 +165,43 @@
|
|
|
158
165
|
"details": "Returns the address of the current owner."
|
|
159
166
|
},
|
|
160
167
|
"pendingOwner()": {
|
|
161
|
-
"details": "The address that ownership of the contract is transferred to. This address may use
|
|
168
|
+
"details": "The address that ownership of the contract is transferred to. This address may use {acceptOwnership()} to gain ownership of the contract."
|
|
162
169
|
},
|
|
163
170
|
"renounceOwnership()": {
|
|
164
|
-
"
|
|
171
|
+
"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.",
|
|
172
|
+
"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 is used as a confirmation and will leave the contract without an owner. MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification"
|
|
165
173
|
},
|
|
166
174
|
"setData(bytes32,bytes)": {
|
|
175
|
+
"custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event.",
|
|
176
|
+
"custom:requirements": "- MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
167
177
|
"details": "Sets singular data for a given `dataKey`",
|
|
168
178
|
"params": {
|
|
169
179
|
"dataKey": "The key to retrieve stored value",
|
|
170
|
-
"dataValue": "The value to set
|
|
180
|
+
"dataValue": "The value to set"
|
|
171
181
|
}
|
|
172
182
|
},
|
|
173
183
|
"setDataBatch(bytes32[],bytes[])": {
|
|
184
|
+
"custom:events": "- {ValueReceived} event when receiving native tokens. - {DataChanged} event. (on each iteration of setting data)",
|
|
185
|
+
"custom:requirements": "- MUST pass when called by the owner or by an authorised address that pass the verification check performed on the owner accordinng to [LSP20-CallVerification] specification",
|
|
174
186
|
"details": "Sets array of data for multiple given `dataKeys`",
|
|
175
187
|
"params": {
|
|
176
188
|
"dataKeys": "The array of data keys for values to set",
|
|
177
|
-
"dataValues": "The array of values to set
|
|
189
|
+
"dataValues": "The array of values to set"
|
|
178
190
|
}
|
|
179
191
|
},
|
|
180
192
|
"supportsInterface(bytes4)": {
|
|
181
193
|
"details": "Returns true if this contract implements the interface defined by `interfaceId`. If the contract doesn't support the `interfaceId`, it forwards the call to the `supportsInterface` extension according to LSP17, and checks if the extension implements the interface defined by `interfaceId`."
|
|
182
194
|
},
|
|
183
195
|
"transferOwnership(address)": {
|
|
184
|
-
"
|
|
196
|
+
"custom:requirements": "- MUST pass when called by the owner or by an authorized address that passes the verification check performed on the owner according to [LSP20-CallVerification] specification. - When notifying the new owner via LSP1, the `typeId` used MUST be `keccak256('LSP0OwnershipTransferStarted')`. - Pending owner cannot accept ownership in the same tx via the LSP1 hook.",
|
|
197
|
+
"details": "Sets the address of the `pendingNewOwner` as a pending owner that should call {`acceptOwnership()`} in order to complete the ownership transfer to become the new {`owner()`} of the account. Notifies the pending owner via LSP1Standard by calling {universalReceiver()} on the pending owner if it's an address that supports LSP1.",
|
|
185
198
|
"params": {
|
|
186
|
-
"
|
|
199
|
+
"pendingNewOwner": "The address of the new pending owner."
|
|
187
200
|
}
|
|
188
201
|
},
|
|
189
202
|
"universalReceiver(bytes32,bytes)": {
|
|
190
|
-
"
|
|
203
|
+
"custom:events": "- {ValueReceived} when receiving native tokens. - {UniversalReceiver} event.",
|
|
204
|
+
"details": "The function performs the following steps: 1. Query the ERC725Y 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 ERC725Y storage with the data key `[_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY] + <bytes32 typeId>`. (Check [LSP2-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.",
|
|
191
205
|
"params": {
|
|
192
206
|
"receivedData": "The data received.",
|
|
193
207
|
"typeId": "The type of call received."
|