@lukso/lsp-smart-contracts 0.10.1 → 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 +0 -1
- package/artifacts/Create2Factory.json +2 -2
- package/artifacts/LSP0ERC725Account.json +3 -3
- package/artifacts/LSP0ERC725AccountInit.json +3 -3
- package/artifacts/LSP11BasicSocialRecovery.json +2 -2
- package/artifacts/LSP11BasicSocialRecoveryInit.json +2 -2
- package/artifacts/LSP16UniversalFactory.json +2 -2
- 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 +3 -3
- package/artifacts/UniversalProfileInit.json +3 -3
- 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 +5 -5
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol +256 -186
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol +6 -2
- package/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol +13 -4
- 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 +85 -27
- 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 +4 -1
- package/contracts/UniversalProfileInit.sol +3 -1
- package/contracts/UniversalProfileInitAbstract.sol +13 -4
- package/devdocs/LSP0ERC725Account.json +33 -19
- package/devdocs/LSP0ERC725AccountInit.json +30 -17
- package/devdocs/LSP9Vault.json +3 -3
- package/devdocs/LSP9VaultInit.json +3 -3
- package/devdocs/UniversalProfile.json +30 -17
- package/devdocs/UniversalProfileInit.json +30 -17
- package/dist/constants.cjs.js +142 -102
- package/dist/constants.d.ts +62 -10
- package/dist/constants.es.js +142 -102
- package/package.json +17 -16
- package/userdocs/LSP0ERC725Account.json +2 -2
- package/userdocs/LSP0ERC725AccountInit.json +2 -2
- package/userdocs/UniversalProfile.json +2 -2
- package/userdocs/UniversalProfileInit.json +2 -2
- package/contracts/Custom/EIP191Signer.sol +0 -12
|
@@ -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.",
|
|
@@ -109,21 +111,25 @@
|
|
|
109
111
|
}
|
|
110
112
|
},
|
|
111
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",
|
|
112
116
|
"details": "Executes any call on other addresses.",
|
|
113
117
|
"params": {
|
|
114
|
-
"data": "The call data to execute on `target`, or the bytecode of the contract to deploy
|
|
115
|
-
"operationType": "The operation to execute: CALL = 0 CREATE = 1 CREATE2 = 2 STATICCALL = 3 DELEGATECALL = 4",
|
|
116
|
-
"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`).",
|
|
117
121
|
"value": "The amount of native tokens to transfer (in Wei)."
|
|
118
122
|
}
|
|
119
123
|
},
|
|
120
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",
|
|
121
127
|
"details": "Generic batch executor function that executes any call on other addresses",
|
|
122
128
|
"params": {
|
|
123
|
-
"datas": "The list of call data to execute on `targets`, or the creation bytecode of the contracts to deploy
|
|
124
|
-
"operationsType": "The list of operations type used: CALL = 0
|
|
125
|
-
"targets": "The list of addresses to call. `targets` will be unused if a contract is created (
|
|
126
|
-
"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)."
|
|
127
133
|
}
|
|
128
134
|
},
|
|
129
135
|
"getData(bytes32)": {
|
|
@@ -143,7 +149,7 @@
|
|
|
143
149
|
}
|
|
144
150
|
},
|
|
145
151
|
"isValidSignature(bytes32,bytes)": {
|
|
146
|
-
"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.",
|
|
147
153
|
"params": {
|
|
148
154
|
"dataHash": "The hash of the data to be validated.",
|
|
149
155
|
"signature": "A signature that can validate the previous parameter (Hash)."
|
|
@@ -156,36 +162,43 @@
|
|
|
156
162
|
"details": "Returns the address of the current owner."
|
|
157
163
|
},
|
|
158
164
|
"pendingOwner()": {
|
|
159
|
-
"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."
|
|
160
166
|
},
|
|
161
167
|
"renounceOwnership()": {
|
|
162
|
-
"
|
|
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"
|
|
163
170
|
},
|
|
164
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",
|
|
165
174
|
"details": "Sets singular data for a given `dataKey`",
|
|
166
175
|
"params": {
|
|
167
176
|
"dataKey": "The key to retrieve stored value",
|
|
168
|
-
"dataValue": "The value to set
|
|
177
|
+
"dataValue": "The value to set"
|
|
169
178
|
}
|
|
170
179
|
},
|
|
171
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",
|
|
172
183
|
"details": "Sets array of data for multiple given `dataKeys`",
|
|
173
184
|
"params": {
|
|
174
185
|
"dataKeys": "The array of data keys for values to set",
|
|
175
|
-
"dataValues": "The array of values to set
|
|
186
|
+
"dataValues": "The array of values to set"
|
|
176
187
|
}
|
|
177
188
|
},
|
|
178
189
|
"supportsInterface(bytes4)": {
|
|
179
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`."
|
|
180
191
|
},
|
|
181
192
|
"transferOwnership(address)": {
|
|
182
|
-
"
|
|
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.",
|
|
183
195
|
"params": {
|
|
184
|
-
"
|
|
196
|
+
"pendingNewOwner": "The address of the new pending owner."
|
|
185
197
|
}
|
|
186
198
|
},
|
|
187
199
|
"universalReceiver(bytes32,bytes)": {
|
|
188
|
-
"
|
|
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.",
|
|
189
202
|
"params": {
|
|
190
203
|
"receivedData": "The data received.",
|
|
191
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.",
|
|
@@ -106,21 +108,25 @@
|
|
|
106
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)": {
|
|
@@ -146,7 +152,7 @@
|
|
|
146
152
|
}
|
|
147
153
|
},
|
|
148
154
|
"isValidSignature(bytes32,bytes)": {
|
|
149
|
-
"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.",
|
|
150
156
|
"params": {
|
|
151
157
|
"dataHash": "The hash of the data to be validated.",
|
|
152
158
|
"signature": "A signature that can validate the previous parameter (Hash)."
|
|
@@ -159,36 +165,43 @@
|
|
|
159
165
|
"details": "Returns the address of the current owner."
|
|
160
166
|
},
|
|
161
167
|
"pendingOwner()": {
|
|
162
|
-
"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."
|
|
163
169
|
},
|
|
164
170
|
"renounceOwnership()": {
|
|
165
|
-
"
|
|
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"
|
|
166
173
|
},
|
|
167
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",
|
|
168
177
|
"details": "Sets singular data for a given `dataKey`",
|
|
169
178
|
"params": {
|
|
170
179
|
"dataKey": "The key to retrieve stored value",
|
|
171
|
-
"dataValue": "The value to set
|
|
180
|
+
"dataValue": "The value to set"
|
|
172
181
|
}
|
|
173
182
|
},
|
|
174
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",
|
|
175
186
|
"details": "Sets array of data for multiple given `dataKeys`",
|
|
176
187
|
"params": {
|
|
177
188
|
"dataKeys": "The array of data keys for values to set",
|
|
178
|
-
"dataValues": "The array of values to set
|
|
189
|
+
"dataValues": "The array of values to set"
|
|
179
190
|
}
|
|
180
191
|
},
|
|
181
192
|
"supportsInterface(bytes4)": {
|
|
182
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`."
|
|
183
194
|
},
|
|
184
195
|
"transferOwnership(address)": {
|
|
185
|
-
"
|
|
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.",
|
|
186
198
|
"params": {
|
|
187
|
-
"
|
|
199
|
+
"pendingNewOwner": "The address of the new pending owner."
|
|
188
200
|
}
|
|
189
201
|
},
|
|
190
202
|
"universalReceiver(bytes32,bytes)": {
|
|
191
|
-
"
|
|
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.",
|
|
192
205
|
"params": {
|
|
193
206
|
"receivedData": "The data received.",
|
|
194
207
|
"typeId": "The type of call received."
|