julien/lovepublic Fork 0
f37bb94
Commits
Clone
git clone https://git.rickub.com/julien/love.git
git clone ssh://git@rickub.com/julien/love.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

scaffold foundry project

julienbrg committed 2026-09-17T20:17:45+02:00 Browse files
f37bb94
added .github/workflows/test.yml +38 -0
new file mode 100644
@@ -0,0 +1,38 @@
1+name: CI
2+
3+permissions: {}
4+
5+on:
6+ push:
7+ pull_request:
8+ workflow_dispatch:
9+
10+env:
11+ FOUNDRY_PROFILE: ci
12+
13+jobs:
14+ check:
15+ name: Foundry project
16+ runs-on: ubuntu-latest
17+ permissions:
18+ contents: read
19+ steps:
20+ - uses: actions/checkout@v5
21+ with:
22+ persist-credentials: false
23+ submodules: recursive
24+
25+ - name: Install Foundry
26+ uses: foundry-rs/foundry-toolchain@v1
27+
28+ - name: Show Forge version
29+ run: forge --version
30+
31+ - name: Run Forge fmt
32+ run: forge fmt --check
33+
34+ - name: Run Forge build
35+ run: forge build --sizes
36+
37+ - name: Run Forge tests
38+ run: forge test -vvv
new file mode 100644
@@ -0,0 +1,38 @@
1+name: CI
2+
3+permissions: {}
4+
5+on:
6+ push:
7+ pull_request:
8+ workflow_dispatch:
9+
10+env:
11+ FOUNDRY_PROFILE: ci
12+
13+jobs:
14+ check:
15+ name: Foundry project
16+ runs-on: ubuntu-latest
17+ permissions:
18+ contents: read
19+ steps:
20+ - uses: actions/checkout@v5
21+ with:
22+ persist-credentials: false
23+ submodules: recursive
24+
25+ - name: Install Foundry
26+ uses: foundry-rs/foundry-toolchain@v1
27+
28+ - name: Show Forge version
29+ run: forge --version
30+
31+ - name: Run Forge fmt
32+ run: forge fmt --check
33+
34+ - name: Run Forge build
35+ run: forge build --sizes
36+
37+ - name: Run Forge tests
38+ run: forge test -vvv
added .gitignore +22 -0
new file mode 100644
@@ -0,0 +1,22 @@
1+# Compiler files
2+cache/
3+out/
4+
5+# Ignores development broadcast logs
6+!/broadcast
7+/broadcast/*/31337/
8+/broadcast/**/dry-run/
9+
10+# Docs
11+docs/
12+
13+# Dotenv file
14+.env
15+.env.*
16+!.env.example
17+
18+# Gas snapshots
19+.gas-snapshot
20+
21+# Editor / OS
22+.DS_Store
new file mode 100644
@@ -0,0 +1,22 @@
1+# Compiler files
2+cache/
3+out/
4+
5+# Ignores development broadcast logs
6+!/broadcast
7+/broadcast/*/31337/
8+/broadcast/**/dry-run/
9+
10+# Docs
11+docs/
12+
13+# Dotenv file
14+.env
15+.env.*
16+!.env.example
17+
18+# Gas snapshots
19+.gas-snapshot
20+
21+# Editor / OS
22+.DS_Store
added .gitmodules +3 -0
new file mode 100644
@@ -0,0 +1,3 @@
1+[submodule "lib/forge-std"]
2+ path = lib/forge-std
3+ url = https://github.com/foundry-rs/forge-std
new file mode 100644
@@ -0,0 +1,3 @@
1+[submodule "lib/forge-std"]
2+ path = lib/forge-std
3+ url = https://github.com/foundry-rs/forge-std
added foundry.lock +8 -0
new file mode 100644
@@ -0,0 +1,8 @@
1+{
2+ "lib/forge-std": {
3+ "tag": {
4+ "name": "v1.16.2",
5+ "rev": "bf647bd6046f2f7da30d0c2bf435e5c76a780c1b"
6+ }
7+ }
8+}
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,8 @@
1+{
2+ "lib/forge-std": {
3+ "tag": {
4+ "name": "v1.16.2",
5+ "rev": "bf647bd6046f2f7da30d0c2bf435e5c76a780c1b"
6+ }
7+ }
8+}
\ No newline at end of file\ No newline at end of file
added foundry.toml +53 -0
new file mode 100644
@@ -0,0 +1,53 @@
1+[profile.default]
2+src = "src"
3+out = "out"
4+libs = ["lib"]
5+test = "test"
6+script = "script"
7+solc = "0.8.30"
8+evm_version = "cancun"
9+optimizer = true
10+optimizer_runs = 200
11+via_ir = false
12+bytecode_hash = "none"
13+verbosity = 2
14+fs_permissions = [{ access = "read", path = "./out" }]
15+
16+[profile.ci]
17+fuzz = { runs = 10_000 }
18+verbosity = 4
19+
20+[profile.lite]
21+optimizer = false
22+
23+[fuzz]
24+runs = 1_000
25+
26+[invariant]
27+runs = 256
28+depth = 128
29+fail_on_revert = false
30+
31+[fmt]
32+line_length = 120
33+tab_width = 4
34+bracket_spacing = false
35+int_types = "long"
36+quote_style = "double"
37+number_underscore = "thousands"
38+multiline_func_header = "attributes_first"
39+sort_imports = true
40+
41+[rpc_endpoints]
42+mainnet = "${MAINNET_RPC_URL}"
43+sepolia = "${SEPOLIA_RPC_URL}"
44+base = "${BASE_RPC_URL}"
45+base_sepolia = "${BASE_SEPOLIA_RPC_URL}"
46+
47+[etherscan]
48+mainnet = { key = "${ETHERSCAN_API_KEY}" }
49+sepolia = { key = "${ETHERSCAN_API_KEY}" }
50+base = { key = "${ETHERSCAN_API_KEY}", chain = 8453 }
51+base_sepolia = { key = "${ETHERSCAN_API_KEY}", chain = 84532 }
52+
53+# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
new file mode 100644
@@ -0,0 +1,53 @@
1+[profile.default]
2+src = "src"
3+out = "out"
4+libs = ["lib"]
5+test = "test"
6+script = "script"
7+solc = "0.8.30"
8+evm_version = "cancun"
9+optimizer = true
10+optimizer_runs = 200
11+via_ir = false
12+bytecode_hash = "none"
13+verbosity = 2
14+fs_permissions = [{ access = "read", path = "./out" }]
15+
16+[profile.ci]
17+fuzz = { runs = 10_000 }
18+verbosity = 4
19+
20+[profile.lite]
21+optimizer = false
22+
23+[fuzz]
24+runs = 1_000
25+
26+[invariant]
27+runs = 256
28+depth = 128
29+fail_on_revert = false
30+
31+[fmt]
32+line_length = 120
33+tab_width = 4
34+bracket_spacing = false
35+int_types = "long"
36+quote_style = "double"
37+number_underscore = "thousands"
38+multiline_func_header = "attributes_first"
39+sort_imports = true
40+
41+[rpc_endpoints]
42+mainnet = "${MAINNET_RPC_URL}"
43+sepolia = "${SEPOLIA_RPC_URL}"
44+base = "${BASE_RPC_URL}"
45+base_sepolia = "${BASE_SEPOLIA_RPC_URL}"
46+
47+[etherscan]
48+mainnet = { key = "${ETHERSCAN_API_KEY}" }
49+sepolia = { key = "${ETHERSCAN_API_KEY}" }
50+base = { key = "${ETHERSCAN_API_KEY}", chain = 8453 }
51+base_sepolia = { key = "${ETHERSCAN_API_KEY}", chain = 84532 }
52+
53+# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
added lib/forge-std +1 -0
new file mode 160000
@@ -0,0 +1 @@
1+Subproject commit bf647bd6046f2f7da30d0c2bf435e5c76a780c1b
new file mode 160000
@@ -0,0 +1 @@
1+Subproject commit bf647bd6046f2f7da30d0c2bf435e5c76a780c1b