Skip to content

Commit 070c0d1

Browse files
jxomtmm
andauthored
feat(extension): Account Abstraction (wevm#2510)
* wip: checkpoint * wip: checkpoint * wip: checkpoint * wip: checkpoint * docs: stub sidebar * chore: snapshots * wip: solady signTypedData * chore: comments * wip * wip: utilize getEip712Domain * fix * wip: refactor * tests * fix types * types * chore: update test * wip: checkpoint * wip: checkpoint * wip: checkpoint * wip: checkpoint * wip: checkpoint * wip: checkpoint * wip: checkpoint * wip: EP 0.6 types * wip: checkpoint * wip: checkpoint * wip: ep 0.6 * wip: type test * wip: errors * wip * wip * wip * wip: errors * wip: knip * wip: fix * wip: fix * wip: no more experimental * wip: errors * wip: errors * wip: docs init * wip: docs * docs * wip: errors * wip: checkpoint * wip: update tests * wip: debug bundler types * wip: tweak test * test: fix * wip: getUserOperation * wip: waitForUserOperationReceipt * wip: update tests * wip: tweaks * wip: tweaks * wip * wip: checkpoint * wip: docs * wip: checkpoint * wip: checkpoint * chore: rebase * chore: snaps * wip: errors * chore: update test * test * test * tests * fix * fix * docs * update * skip * fix * chore: up * chore: up * chore: up * chore: up * chore: up * chore: size * chore: update submodule * chore: rename mock account * wip * tweak: account sigs * tests: cb * docs: sidebar * wip: webauthn accounts + coinbase p256 owners * chore: size-limit * docs * chore: bump vocs * chore: refactor structure * chore: refactor accounts * chore: up site * chore: up * chore: up * chore: snapshots * chore: up * chore: up * chore: up * chore: up * chore: up * chore: up * chore: up * chore: up site * chore: up * chore: up * docs: up * wip: solady deployments * chore: up * chore: up * chore: up * wip: paymasters * tests: up * chore: up docs * chore: simplify account types * chore: merge * docs: up * docs: tweak * chore: tweak docs; tweak nonce impl * docs: up * chore: changeset * chore: up size * chore: tweak tests * fix: types * docs: tweaks * chore: up Co-authored-by: awkweb <[email protected]> * chore: up Co-authored-by: awkweb <[email protected]> * chore: up Co-authored-by: awkweb <[email protected]> * chore: up Co-authored-by: awkweb <[email protected]> * docs: pimlico * chore: rm internalType * docs: up pimlico usage * chore: error types * chore: error types * docs: up note * chore: knip * chore: up snaps * chore: add paymaster to example * chore: format * docs: tweaks * format * tweak: smart account types * chore: format * chore: tweaks * chore: format * test: up * chore: knip * chore: tweaks * docs: up --------- Co-authored-by: awkweb <[email protected]>
1 parent f7feeac commit 070c0d1

File tree

232 files changed

+28547
-2194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+28547
-2194
lines changed

.changeset/thirty-glasses-rush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": minor
3+
---
4+
5+
Added an **ERC-4337 Account Abstraction** extension. [See Docs](https://viem.sh/account-abstraction).

.github/workflows/verify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ jobs:
128128
VITE_ANVIL_FORK_URL_ZKSYNC: ${{ secrets.VITE_ANVIL_FORK_URL_ZKSYNC }}
129129
VITE_BATCH_MULTICALL: ${{ matrix.multicall }}
130130
VITE_NETWORK_TRANSPORT_MODE: ${{ matrix.transport-mode }}
131+
VITE_SHARD_ID: ${{ matrix.shard }}
131132

132133
- name: Upload coverage reports to Codecov
133134
uses: codecov/codecov-action@v4

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@
44
[submodule "contracts/lib/solady"]
55
path = contracts/lib/solady
66
url = [email protected]:Vectorized/solady.git
7+
[submodule "contracts/lib/solady-dc09481"]
8+
path = contracts/lib/solady-dc09481
9+
url = [email protected]:Vectorized/solady.git
10+
[submodule "contracts/lib/account-abstraction"]
11+
path = contracts/lib/account-abstraction
12+
url = [email protected]:eth-infinitism/account-abstraction.git
13+
[submodule "contracts/lib/openzeppelin"]
14+
path = contracts/lib/openzeppelin
15+
url = [email protected]:OpenZeppelin/openzeppelin-contracts.git

.vscode/settings.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
"typescript.updateImportsOnFileMove.enabled": "always",
66
"typescript.tsdk": "node_modules/typescript/lib",
77
"typescript.enablePromptUseWorkspaceTsdk": true,
8-
"editor.codeActionsOnSave": {
9-
"source.organizeImports.biome": "explicit"
10-
},
8+
"javascript.preferences.autoImportFileExcludePatterns": [
9+
"**/node_modules/**",
10+
"**/_types/**"
11+
],
12+
"typescript.preferences.autoImportFileExcludePatterns": [
13+
"**/node_modules/**",
14+
"**/_types/**"
15+
],
1116
"[json]": {
1217
"editor.defaultFormatter": "biomejs.biome"
1318
},

biome.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"bun.lockb",
1414
"cache",
1515
"contracts",
16-
"test/contracts",
1716
"test/kzg/*.json",
1817
"test/kzg/*.txt",
1918
"coverage",

contracts/foundry.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
[profile.default]
2+
libs = ["lib"]
23
remappings = [
4+
"@openzeppelin/=lib/openzeppelin/",
5+
"account-abstraction/=lib/account-abstraction/contracts/",
36
"solady/=lib/solady/src/",
7+
"solady-dc09481/=lib/solady-dc09481/src/",
48
]
59
src = "src"
610
out = "out"
11+
12+
[rpc_endpoints]
13+
mainnet = "${MAINNET_RPC_URL}"
14+
sepolia = "${SEPOLIA_RPC_URL}"
15+
holesky = "${HOLESKY_RPC_URL}"
16+
17+
[etherscan]
18+
mainnet = { key = "${ETHERSCAN_API_KEY}" }
19+
sepolia = { key = "${ETHERSCAN_API_KEY}" }
20+
holesky = { key = "${ETHERSCAN_API_KEY}" }

contracts/lib/account-abstraction

Submodule account-abstraction added at f1c5c11

contracts/lib/openzeppelin

Submodule openzeppelin added at b73bcb2

contracts/lib/solady-dc09481

Submodule solady-dc09481 added at dc09481
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: UNLICENSED
2+
pragma solidity ^0.8.13;
3+
4+
import {console} from "forge-std/console.sol";
5+
import "forge-std/Test.sol";
6+
import {SoladyAccount06} from "../../src/accounts/SoladyAccount_06.sol";
7+
import {SoladyAccountFactory06} from "../../src/accounts/SoladyAccountFactory_06.sol";
8+
9+
contract Deploy is Test {
10+
function run() external {
11+
vm.startBroadcast(vm.envUint("PRIVATE_KEY"));
12+
13+
SoladyAccount06 implementation = new SoladyAccount06{
14+
salt: bytes32(uint256(1337))
15+
}();
16+
new SoladyAccountFactory06{salt: bytes32(uint256(1337))}(
17+
address(implementation)
18+
);
19+
20+
vm.stopBroadcast();
21+
}
22+
}

0 commit comments

Comments
 (0)