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: ERCS/erc-7779.md
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@ Account Abstraction Wallets, given the wallet-specific validation and execution
37
37
38
38
This spec provides a standard approach for fetching the storage base used in the delegated account together with an optional mechanism to clean up the storage.
39
39
40
+
Moreover, it is worth noting that this spec is not limited to [EIP-7702](./eip-7702.md) based smart accounts but smart accounts and smart contracts in general that uses a custom storage slot.
41
+
40
42
## Specification
41
43
42
44
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
Accounts MUST implement the `IInteroperableDelegatedAccount` to be compliant with the standard.
86
89
90
+
Accounts MUST use `keccak256()` to compute the storage bases for `accountStorageBases()`, unless using external storage contract.
91
+
87
92
Accounts MAY implement the `IRedelegableDelegatedAccount`.
88
93
89
94
### `accountId()`
@@ -98,6 +103,8 @@ Wallet A information could be extracted from `accountId()`.
98
103
99
104
This function returns the list of base storage slots of that account has used.
100
105
106
+
To comply with this standard, the account MUST use `keccak256()` to prevent collision when calculating the storage slot.
107
+
101
108
EIP-7702 Accounts do plan to use a custom non-zero storage slot to avoid storage collision as much as possible, however, there hasn’t been a standardized approach on how to fetch them.
102
109
103
110
This function provides a standardized approach for wallets and other applications to check the base storage slots of an account, and verify if the base storage slots are far enough from the newly to-be-redelegated account’s base storage slot.
@@ -186,6 +193,8 @@ This standard was specifically for Smart Accounts for EOA, but this could be app
186
193
187
194
5. It is worth noting that this standard is an ERC, which means that even if the ERC enforces it, the actual implementation may not be compliant with it. e.g., accounts pretending to support this standard which is not, in fact. So it is recommend to validate if the account is a know implementation that is secure and compliant with the standard.
188
195
196
+
6. The standard ENFORCES the storage slot to be calculated through `keccak256()` to reduce collision. The preimage of the hash could be the name/version or a combination, it is under full discretion of the account.
197
+
189
198
## Copyright
190
199
191
200
Copyright and related rights waived via [CC0](../LICENSE.md).
0 commit comments