Skip to content

Commit 1c0983f

Browse files
committed
docs: update for v2.0.0
1 parent 72809db commit 1c0983f

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: sc-template Test CI
1+
name: test
22

33
on: [pull_request, workflow_dispatch]
44

README.md

+29-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# Light Account
22

3-
[![gh_ci_badge]][gh_ci_link]\
4-
[![discord_badge]][discord_link]
3+
[![gh_ci_badge]][gh_ci_link] [![discord_badge]][discord_link]
54

65
[gh_ci_badge]: https://github.com/alchemyplatform/light-account/actions/workflows/test.yml/badge.svg
76
[gh_ci_link]: https://github.com/alchemyplatform/light-account/actions/workflows/test.yml
8-
[discord_badge]: https://dcbadge.vercel.app/api/server/alchemyplatform
7+
[discord_badge]: https://dcbadge.vercel.app/api/server/alchemyplatform?style=flat
98
[discord_link]: https://discord.gg/alchemyplatform
109

1110
![](./img/light-account.jpg)
1211

13-
A simple ERC-4337 compatible smart contract account with a designated owner. [Account Kit](https://accountkit.alchemy.com) is the easiest way to integrate Light Account.
12+
A set of lightweight ERC-4337 compatible smart contract accounts with designated ownership. [Account Kit](https://accountkit.alchemy.com) is the easiest way to integrate Light Account.
1413

1514
## Features
1615

16+
### `LightAccount`
17+
1718
Like [eth-infinitism](https://github.com/eth-infinitism/account-abstraction)'s [`SimpleAccount`](https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/samples/SimpleAccount.sol), but with the following changes:
1819

1920
1. Instead of the default storage slots, uses namespaced storage to avoid clashes when switching implementations.
@@ -24,9 +25,29 @@ Like [eth-infinitism](https://github.com/eth-infinitism/account-abstraction)'s [
2425

2526
_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._
2627

27-
4. Event `SimpleAccountInitialized` renamed to `LightAccountInitialized`.
28+
4. Improves gas estimation by enabling switching between `ecrecover` and ERC-1271 signature validation by prepending a `SignatureType` byte to the user operation signature. Allowed `SignatureType` values:
29+
30+
- `SignatureType.EOA`: For an EOA owner. Signature is validated using `ecrecover`.
31+
- `SignatureType.CONTRACT`: For a contract owner. Signature is validated using `owner.isValidSignature`.
32+
33+
5. The factory uses Solady's `LibClone.createDeterministicERC1967` instead of OpenZeppelin's `ERC1967Proxy`.
34+
35+
6. The factory includes ownership and entry point staking capabilities to address mempool limitations for unstaked entities as defined in [ERC-7562](https://eips.ethereum.org/EIPS/eip-7562).
36+
37+
7. Event `SimpleAccountInitialized` renamed to `LightAccountInitialized`.
38+
39+
8. Uses custom errors.
40+
41+
### `MultiOwnerLightAccount`
42+
43+
Like `LightAccount`, but with the following changes:
44+
45+
1. Multiple owners are supported. They can be specified at account deployment, or updated via `updateOwners`. This is a simple single-step operation, so care must be taken to ensure that the ownership is being updated to the correct address(es).
46+
47+
2. Allowed `SignatureType` values:
2848

29-
5. Uses custom errors.
49+
- `SignatureType.EOA`: For EOA owners. Signature is validated using `ecrecover`.
50+
- `SignatureType.CONTRACT_WITH_ADDR`: For contract owners. Signature is validated using `owner.isValidSignature`. The contract owner address MUST be passed as part of the signature, following the format: `SignatureType.CONTRACT_WITH_ADDR || contractOwnerAddress || signature`, where `||` is the byte concatenation operator.
3051

3152
## Deployments
3253

@@ -49,7 +70,8 @@ forge test -vvv
4970
The deploy script supports any [wallet options](https://book.getfoundry.sh/reference/forge/forge-script#wallet-options---raw) provided by Foundry, including local private keys, mneumonics, hardware wallets, and remote signers. Append the chosen signing method's option to the field marked `[WALLET_OPTION]` in the following script command, and set the sender address in the field `[SENDER_ADDRESS]`.
5071

5172
```bash
52-
forge script script/Deploy_LightAccountFactory.s.sol:Deploy_LightAccountFactory [WALLET_OPTION] --sender [SENDER_ADDRESS]--rpc-url [RPC_URL] -vvvv --broadcast --verify
73+
forge script script/Deploy_LightAccountFactory.s.sol [WALLET_OPTION] --sender [SENDER_ADDRESS]--rpc-url [RPC_URL] -vvvv --broadcast --verify
74+
forge script script/Deploy_MultiOwnerLightAccountFactory.s.sol [WALLET_OPTION] --sender [SENDER_ADDRESS]--rpc-url [RPC_URL] -vvvv --broadcast --verify
5375
```
5476

5577
Make sure the provided `RPC_URL` is set to an RPC for the chain you wish to deploy on.

0 commit comments

Comments
 (0)