You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LSPs/LSP-0-ERC725Account.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ Adopting smart contract accounts over traditional EOAs streamlines blockchain in
65
65
66
66
-**Dynamic Information Storage**: Unlike EOAs, smart contract accounts can record static information, making them self-explanatory entities that can assist in identity verification for off-chain entities, and enable the decentralized tracking of any information stored such as assets, followers, etc. The information stored can also be standardized, for example [LSP3-Profile-Metadata] for storing profile information, [LSP5-ReceivedAssets] for storing the addresses of received assets, and [LSP10-ReceivedVaults] for storing addresses of received vaults, etc ..
67
67
68
-
-**Upgradeable Security**: Owners can use a simple EOA for owning the account having basic level of security, or opt for an owner having a multisignature setup, or permissions access control contracts providing advanced layer of security in contorlling the account.
68
+
-**Upgradeable Security**: Owners can use a simple EOA for owning the account having basic level of security, or opt for an owner having a multisignature setup, or permissions access control contracts providing advanced layer of security in controlling the account.
69
69
70
70
-**Inclusive Control**: Users can decide to own the account with a permission based access control contract (e.g: the [LSP6-KeyManager]) which allows owners to assign specific rights to different actors, like granting a party the right to update profile information without providing full transactional authority.
71
71
@@ -109,15 +109,15 @@ However, in alignment with the [LSP20-CallVerification] standard, these owner-ex
109
109
110
110
For example, if the caller address is not the owner, the function will call the `lsp20VerifyCall(..)` on the owner address function to validate the transaction before execution passing the following arguments:
111
111
112
-
-`requestor`: The address calling the function to be executed.
112
+
-`requester`: The address calling the function to be executed.
113
113
-`target`: The address of the account.
114
114
-`caller`: The address calling the function to be executed.
115
115
-`value`: The value sent by the caller to the function called on the account.
116
116
-`receivedCalldata`: The calldata sent by the caller to the account.
117
117
118
118
The expected outcome is for the `bytes4` returned value to match the first `bytes3` of the function selector of `lsp20VerifyCall` for the operation to proceed. Specifically, if the fourth byte of the call is `0x01`, the function MUST call `lsp20VerifyCallResult` after execution of the function passing the following arguments:
119
119
120
-
-`callHash`: The `keccak256` hash of the parameters of `lsp20VerifyCall(address,address,address,uint256,bytes)` parameters packed-encoded (concatened).
120
+
-`callHash`: The `keccak256` hash of the parameters of `lsp20VerifyCall(address,address,address,uint256,bytes)` parameters packed-encoded (concatenated).
121
121
122
122
-`callResult`: the result of the function being called on the account.
123
123
- if the function being called returns some data, the `callResult` MUST be the value returned by the function being called as abi-encoded `bytes`.
@@ -131,7 +131,7 @@ The function designated to be called by the pending owner is:
131
131
132
132
-`acceptOwnership()`
133
133
134
-
The same logic applies to `acceptOwnership` function, expcet that it should be either called by the pending owner or an address allowed by the pending owner. In case the caller is not the pending owner, the verification should happen according to the [LSP20-CallVerification] on the address of the pending owner.
134
+
The same logic applies to `acceptOwnership` function, except that it should be either called by the pending owner or an address allowed by the pending owner. In case the caller is not the pending owner, the verification should happen according to the [LSP20-CallVerification] on the address of the pending owner.
135
135
136
136
> Read more about the [Rational behind using LSP20-CallVerifiaction](#lsp20-callverification-usage) in the LSP0-ERC725Account standard.
This event MUST be emitted when the `universalReceiver` function is succesfully executed.
81
+
This event MUST be emitted when the `universalReceiver` function is successfully executed.
82
82
83
83
_Values:_
84
84
@@ -100,10 +100,10 @@ UniversalReceiver delegation allows to forward the `universalReceiver(..)` call
100
100
101
101
The ability to react to upcoming actions with a logic hardcoded within the `universalReceiver(..)` function comes with limitations, as only a fixed functionality can be coded or the [`UniversalReceiver`](#universalreceiver-1) event be fired.
102
102
103
-
This section explains a way to forward the call to the `universalReceiver(..)` function to an external smart contract to extend and change funcitonality over time.
103
+
This section explains a way to forward the call to the `universalReceiver(..)` function to an external smart contract to extend and change functionality over time.
104
104
105
105
The delegation works by simply forwarding a call to the `universalReceiver(..)` function to a delegated smart contract calling the `universalReceiverDelegate(..)` function on the external smart contract.
106
-
As the external smart contract doesn't know about the inital`msg.sender` and the `msg.value`, this specification proposes to add these values as arguments. This allows the external contract to know the full context of the initial `universalReceiver` call and react accordingly.
106
+
As the external smart contract doesn't know about the initial`msg.sender` and the `msg.value`, this specification proposes to add these values as arguments. This allows the external contract to know the full context of the initial `universalReceiver` call and react accordingly.
107
107
108
108
### Specification
109
109
@@ -181,7 +181,7 @@ An implementation can be found in the [lukso-network/lsp-smart-contracts] reposi
181
181
182
182
### UniversalReceiver Example:
183
183
184
-
After transfering token from `TokenABC` to `MyWallet`, the owner of `MyWallet` contract can know, by looking at the emitted UniversalReceiver event, that the `typeId` is `_TOKEN_RECEIVING_HASH`.
184
+
After transferring token from `TokenABC` to `MyWallet`, the owner of `MyWallet` contract can know, by looking at the emitted UniversalReceiver event, that the `typeId` is `_TOKEN_RECEIVING_HASH`.
185
185
186
186
Enabling the owner to know the token sender address and the amount sent by looking into the `data`.
187
187
@@ -300,8 +300,8 @@ contract UniversalReceiverDelegate is ERC165, ILSP1 {
300
300
301
301
function universalReceiverDelegate(address caller, uint256 value, bytes32 typeId, bytes memory data) public returns (bytes memory) {
302
302
// Any logic could be written here:
303
-
// - Interfact with DeFi protocol contract to sell the new tokens received automatically.
304
-
// - Register the token received on other registery contract.
303
+
// - Interact with DeFi protocol contract to sell the new tokens received automatically.
304
+
// - Register the token received on other registry contract.
305
305
// - Allow only tokens with `_TOKEN_RECEIVING_HASH` hash and reject the others.
306
306
// - revert; so in this way the wallet will have the option to reject any token.
Copy file name to clipboardExpand all lines: LSPs/LSP-11-BasicSocialRecovery.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,7 +182,7 @@ _Requirements:_
182
182
function selectNewController(address addressSelected) external
183
183
```
184
184
185
-
Select an address to be a potentiel controller address if he reaches the guardian threshold and provide the correct plainSecret. MUST fire the [SelectedNewController](#selectednewcontroller) event.
185
+
Select an address to be a potential controller address if he reaches the guardian threshold and provide the correct plainSecret. MUST fire the [SelectedNewController](#selectednewcontroller) event.
186
186
187
187
_Parameters:_
188
188
@@ -252,7 +252,7 @@ MUST be emitted when changing the secret hash.
This standard describes a set of [ERC725Y](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) data key values to store addresses of issued assets by an [ERC725X](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) smart contract.
14
15
15
16
## Abstract
16
-
This data key value standard describes a set of data keys that can be added to an [ERC725Y](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) smart contract to describe issued assets:
17
17
18
+
This data key value standard describes a set of data keys that can be added to an [ERC725Y](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) smart contract to describe issued assets:
18
19
19
20
-`LSP12IssuedAssets[]` is an [LSP2 array](./LSP-2-ERC725YJSONSchema.md) of addresses.
20
21
-`LSP12IssuedAssetsMap` is a dynamic address mapping, which contains:
21
22
- an [ERC165 interface ID](https://eips.ethereum.org/EIPS/eip-165) to easily identify the standard used by the mapped asset smart contract
22
23
- and the index in the `LSP12IssuedAssets[]` array.
23
24
24
-
The data key `LSP12IssuedAssetsMap` exists so that smart contracts can detect if an address is present in the array (e.g. as done in the [LSP1-UniversalReceiverDelegate](./LSP-1-UniversalReceiver.md)).
25
+
The data key `LSP12IssuedAssetsMap` exists so that smart contracts can detect if an address is present in the array (e.g. as done in the [LSP1-UniversalReceiverDelegate](./LSP-1-UniversalReceiver.md)).
25
26
26
27
## Motivation
27
-
This standard allows any smart contract to state that it issued a certain asset. The asset itself MUST reference the issuer smart contract as well, for it be verifable issued. This allows other smart contracts to link the authenticity of an asset to a specific issuer. See also [LSP4 - DigitalAsset Metadata](./LSP-4-DigitalAsset-Metadata.md) for the `owner` and `LSP4Creators[]`.
28
+
29
+
This standard allows any smart contract to state that it issued a certain asset. The asset itself MUST reference the issuer smart contract as well, for it be verifiable issued. This allows other smart contracts to link the authenticity of an asset to a specific issuer. See also [LSP4 - DigitalAsset Metadata](./LSP-4-DigitalAsset-Metadata.md) for the `owner` and `LSP4Creators[]`.
28
30
29
31
A full verification flow for an asset should contain a check on the asset and the issuer smart contract. If we use an asset using [LSP4 - DigitalAsset Metadata](./LSP-4-DigitalAsset-Metadata.md) and a [LSP0 - ERC725Account](./LSP-0-ERC725Account.md) as the issuer. The flow should looks as follows:
30
32
@@ -37,19 +39,17 @@ Every contract that supports the ERC725Account SHOULD have the following data ke
37
39
38
40
### ERC725Y Data Keys
39
41
40
-
41
42
#### LSP12IssuedAssets[]
42
43
43
44
An array of issued smart contract assets, like tokens (_e.g.: [LSP7 Digital Assets](./LSP-7-DigitalAsset)_) and NFTs (_e.g.: [LSP8 Identifiable Digital Assets](./LSP-8-IdentifiableDigitalAsset)_).
@@ -60,18 +60,19 @@ For more info about how to access each index of the `LSP12IssuedAssets[]` array,
60
60
References issued smart contract assets, like tokens (_e.g.: [LSP7 Digital Assets](./LSP-7-DigitalAsset)_) and NFTs (_e.g.: [LSP8 Identifiable Digital Assets](./LSP-8-IdentifiableDigitalAsset)_). This data key exists so that smart contracts can detect whether the address of an asset is present in the `LSP12IssuedAssets[]` array without looping all over it on-chain. Moreover, it helps to identify at which index in the `LSP12IssuedAssets[]` the asset address is located for easy access and to change or remove this specific asset from the array. Finally, it also allows the detection of the interface supported by the asset.
61
61
62
62
The data value MUST be constructed as follows: `bytes4(standardInterfaceId) + uint128(indexNumber)`. Where:
63
+
63
64
-`standardInterfaceId` = the [ERC165 interface ID](https://eips.ethereum.org/EIPS/eip-165) of the standard that the token or asset smart contract implements (if the ERC165 interface ID is unknown, `standardInterfaceId = 0xffffffff`).
64
65
-`indexNumber` = the index in the [`LSP12IssuedAssets[]` Array](#LSP12Issuedassets)
65
66
66
67
Value example: `0x5fcaac27000000000000000c` (interfaceId: `0x5fcaac27` for a [LSP7](./LSP-7-DigitalAsset.md) token, index position `0x000000000000000c = 12`).
67
68
68
69
```json
69
70
{
70
-
"name": "LSP12IssuedAssetsMap:<address>",
71
-
"key": "0x74ac2555c10b9349e78f0000<address>",
72
-
"keyType": "Mapping",
73
-
"valueType": "(bytes4,uint128)",
74
-
"valueContent": "(Bytes4,Number)"
71
+
"name": "LSP12IssuedAssetsMap:<address>",
72
+
"key": "0x74ac2555c10b9349e78f0000<address>",
73
+
"keyType": "Mapping",
74
+
"valueType": "(bytes4,uint128)",
75
+
"valueContent": "(Bytes4,Number)"
75
76
}
76
77
```
77
78
@@ -80,24 +81,26 @@ Value example: `0x5fcaac27000000000000000c` (interfaceId: `0x5fcaac27` for a [LS
-`data`: The data sent SHOULD be abi encoded and contain the [current owner](#owner) (`address`) and the [pending owner](#pendingowner) (`address`) respectively.
95
95
96
-
The Type ID associated with this hook COULD be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Example where the LSP14 type ID is overriden can be found in [LSP0](LSP-0-ERC725Account.md#transferownership) and [LSP9](LSP-9-Vault.md#transferownership) standards.
96
+
The Type ID associated with this hook COULD be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Example where the LSP14 type ID is overridden can be found in [LSP0](LSP-0-ERC725Account.md#transferownership) and [LSP9](LSP-9-Vault.md#transferownership) standards.
97
97
98
98
#### acceptOwnership
99
99
@@ -123,7 +123,7 @@ MUST emit a [`OwnershipTransferred`](https://eips.ethereum.org/EIPS/eip-173#spec
-`data`: The data sent SHOULD be abi encoded and contain the [previous owner](#owner) (`address`) and the new owner (`address`) respectively.
125
125
126
-
The Type IDs associated with these hooks can be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Examples where the LSP14 type IDs are overriden can be found in the [LSP0](LSP-0-ERC725Account.md#acceptownerhsip) and [LSP9](LSP-9-Vault.md#acceptownership) standards.
126
+
The Type IDs associated with these hooks can be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Examples where the LSP14 type IDs are overridden can be found in the [LSP0](LSP-0-ERC725Account.md#acceptownerhsip) and [LSP9](LSP-9-Vault.md#acceptownership) standards.
127
127
128
128
#### renounceOwnership
129
129
@@ -142,7 +142,7 @@ MUST emit [`OwnershipTransferred`](https://eips.ethereum.org/EIPS/eip-173#specif
142
142
143
143
- MUST be called only by the `owner()` only.
144
144
- The second call MUST happen AFTER the delay of 100 blocks and within the next 100 blocks from the first `renounceOwnership(..)` call.
145
-
- If 200 blocks have passed, the `renounceOwnership(..)` call phase SHOULD reset the process, and a new one will be initated.
145
+
- If 200 blocks have passed, the `renounceOwnership(..)` call phase SHOULD reset the process, and a new one will be initiated.
0 commit comments