Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ALC-2] add comment explaining contract owner limitations for user operation validation #3

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/LightAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ import {CustomSlotInitializable} from "./CustomSlotInitializable.sol";
* exposing its own `isValidSignature` method. This only works when the owner of
* LightAccount also support ERC-1271.
*
* ERC-4337's bundler validation rules limit the types of contracts that can be
* used as owners to validate user operation signatures. For example, the
* contract's `isValidSignature` function may not use any forbidden opcodes
* such as `TIMESTAMP` or `NUMBER`, and the contract may not be an ERC-1967
* proxy as it accesses a constant implementation slot not associated with
* the account, violating storage access rules. This also means that the
* owner of a LightAccount may not be another LightAccount if you want to send
* user operations through a bundler.
*
* 4. Event `SimpleAccountInitialized` renamed to `LightAccountInitialized`.
*/
contract LightAccount is BaseAccount, TokenCallbackHandler, UUPSUpgradeable, CustomSlotInitializable, IERC1271 {
Expand Down