Skip to content

Commit 1b09316

Browse files
committed
initial prototype
1 parent 4d1f7be commit 1b09316

31 files changed

Lines changed: 741 additions & 93 deletions

.gitmodules

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
11
[submodule "lib/forge-std"]
22
path = lib/forge-std
33
url = https://github.com/foundry-rs/forge-std
4+
[submodule "lib/openzeppelin-contracts"]
5+
path = lib/openzeppelin-contracts
6+
url = https://github.com/OpenZeppelin/openzeppelin-contracts
7+
[submodule "lib/solady"]
8+
path = lib/solady
9+
url = https://github.com/vectorized/solady
10+
[submodule "lib/smart-wallet"]
11+
path = lib/smart-wallet
12+
url = https://github.com/coinbase/smart-wallet
13+
[submodule "lib/magicspend"]
14+
path = lib/magicspend
15+
url = https://github.com/coinbase/magicspend
16+
[submodule "lib/account-abstraction"]
17+
path = lib/account-abstraction
18+
url = https://github.com/eth-infinitism/account-abstraction
19+
branch = releases/v0.6
20+
[submodule "lib/webauthn-sol"]
21+
path = lib/webauthn-sol
22+
url = https://github.com/base-org/webauthn-sol

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,36 @@ https://book.getfoundry.sh/
1515

1616
## Usage
1717

18+
### Getting started (submodules)
19+
20+
This repo uses git submodules for Foundry dependencies (in `lib/`).
21+
22+
Clone with submodules:
23+
24+
```shell
25+
$ git clone --recurse-submodules <repo>
26+
```
27+
28+
If you already cloned without submodules:
29+
30+
```shell
31+
$ git submodule update --init --recursive
32+
```
33+
34+
Then build / test as usual:
35+
36+
```shell
37+
$ forge build
38+
$ forge test
39+
```
40+
41+
To update dependencies later:
42+
43+
```shell
44+
$ forge install
45+
$ git submodule update --init --recursive
46+
```
47+
1848
### Build
1949

2050
```shell

foundry.lock

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,44 @@
11
{
2+
"lib/account-abstraction": {
3+
"branch": {
4+
"name": "releases/v0.6",
5+
"rev": "fa61290d37d079e928d92d53a122efcc63822214"
6+
}
7+
},
28
"lib/forge-std": {
39
"tag": {
410
"name": "v1.14.0",
511
"rev": "1801b0541f4fda118a10798fd3486bb7051c5dd6"
612
}
13+
},
14+
"lib/magicspend": {
15+
"tag": {
16+
"name": "v1.0.0",
17+
"rev": "2011f5540fa0d646089dcc60cab6b68d5a031482"
18+
}
19+
},
20+
"lib/openzeppelin-contracts": {
21+
"tag": {
22+
"name": "v5.5.0",
23+
"rev": "fcbae5394ae8ad52d8e580a3477db99814b9d565"
24+
}
25+
},
26+
"lib/smart-wallet": {
27+
"tag": {
28+
"name": "v1.1.0",
29+
"rev": "a8c6456f3a6d5d2dea08d6336b3be13395cacd42"
30+
}
31+
},
32+
"lib/solady": {
33+
"tag": {
34+
"name": "v0.1.26",
35+
"rev": "acd959aa4bd04720d640bf4e6a5c71037510cc4b"
36+
}
37+
},
38+
"lib/webauthn-sol": {
39+
"tag": {
40+
"name": "v1.0.0",
41+
"rev": "619f20ab0f074fef41066ee4ab24849a913263b2"
42+
}
743
}
844
}

foundry.toml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
src = "src"
33
out = "out"
44
libs = ["lib"]
5-
remappings = ["forge-std/=lib/forge-std/src/"]
5+
auto_detect_solc = true
6+
solc_version = "0.8.23"
7+
evm_version = "cancun"
8+
optimizer = true
9+
optimizer_runs = 200
10+
via_ir = true
11+
remappings = [
12+
"forge-std/=lib/forge-std/src/",
13+
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
14+
"solady/=lib/solady/src/",
15+
"smart-wallet/=lib/smart-wallet/src/",
16+
"account-abstraction/=lib/account-abstraction/contracts/",
17+
"webauthn-sol/=lib/webauthn-sol/src/",
18+
"magicspend/=lib/magicspend/src/",
19+
]
20+
21+
[lint]
22+
exclude_lints = ["asm-keccak256"]
623

724
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

lib/account-abstraction

Submodule account-abstraction added at fa61290

lib/magicspend

Submodule magicspend added at 4ce54f1

lib/openzeppelin-contracts

Submodule openzeppelin-contracts added at a1a0a67

lib/smart-wallet

Submodule smart-wallet added at 924743b

lib/solady

Submodule solady added at 90db92c

lib/webauthn-sol

Submodule webauthn-sol added at 619f20a

0 commit comments

Comments
 (0)