-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfoundry.toml
More file actions
127 lines (114 loc) · 4.21 KB
/
Copy pathfoundry.toml
File metadata and controls
127 lines (114 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Full reference https://github.com/foundry-rs/foundry/tree/master/config
[profile.default]
bytecode_hash = "none"
# Compile test contracts as dynamically-linked libraries. Cuts full-graph compile
# time and peak memory, and keeps the optimizer's inlining units small enough that
# the full build (src + 250 test files, via-IR) no longer dies with a Yul
# stack-too-deep that no single contract reproduces in isolation. NOTE: linking
# changes `new Contract()` codegen in tests, which skips `vm.prank` consumption on
# constructors — so the correctness suite (profile.fast) turns it back OFF.
dynamic_test_linking = true
fuzz = { runs = 1_000 }
gas_reports = ["*"]
libs = ["dependencies"]
# optimizer = true (default)
optimizer_runs = 1
fs_permissions = [{ access = "read-write", path = "./" }]
solc = "0.8.26"
evm_version = "cancun"
via_ir = true
allow_internal_expect_revert = true
[profile.fast]
# Local iteration profile: much faster compile/test cycles.
# Use with: `FOUNDRY_PROFILE=fast forge test ...`
# Linking is disabled here: tests must run with exact CREATE semantics
# (`vm.prank` + `new` consumes the prank), which dynamic linking alters.
dynamic_test_linking = false
via_ir = true
optimizer = false
sparse_mode = true
gas_reports = []
fuzz = { runs = 256 }
invariant = { runs = 64, depth = 64, fail_on_revert = true }
[profile.local_build]
# Local build-only profile that excludes tests and scripts from the compile graph.
# Use with: `FOUNDRY_PROFILE=local_build forge build`
via_ir = true
optimizer = false
sparse_mode = true
gas_reports = []
test = ".foundry/empty-test"
script = ".foundry/empty-script"
out = "out/local-build"
cache_path = "cache/local-build"
[profile.coverage]
via_ir = true
optimizer = true
optimizer_runs = 200
[profile.deploy_size]
via_ir = true
optimizer = true
optimizer_runs = 1
gas_reports = []
[profile.ci]
verbosity = 4
[profile.ci_size]
# EIP-170 size gate for CI: compile ONLY src (no tests/scripts) with the optimizer
# ON, mirroring production codegen, so `forge build --sizes` reports real deployed
# facet sizes. The correctness suite runs under `fast` (optimizer OFF) which inflates
# bytecode ~80% and would false-fail the size check — hence this separate profile.
# src-only keeps the optimizer+via-IR compile within the 16 GB CI runner budget that
# the full `forge build --sizes` graph (incl. 90 test files) blew in #151.
via_ir = true
optimizer = true
optimizer_runs = 1
gas_reports = []
test = ".foundry/empty-test"
script = ".foundry/empty-script"
out = "out/ci-size"
cache_path = "cache/ci-size"
[fmt]
bracket_spacing = true
int_types = "long"
line_length = 120
multiline_func_header = "all"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4
wrap_comments = true
[invariant]
fail_on_revert = true
runs = 256
depth = 120
[rpc_endpoints]
# Uncomment to enable the RPC server
arbitrum_goerli = "${ARBITRUM_GOERLI_RPC}"
arbitrum = "${ARBITRUM_RPC}"
mainnet = "${MAINNET_RPC}"
sepolia = "${SEPOLIA_RPC}"
holesky = "${HOLESKY_RPC}"
base = "${BASE_RPC}"
base-sepolia = "${BASE_SEPOLIA_RPC}"
# Arc Testnet (Circle) — chainId 5042002, USDC-gas, per-tx cap 16,777,216 gas.
arc_testnet = "${ARC_TESTNET_RPC:-https://rpc.testnet.arc.io}"
# Robinhood Chain Sepolia — chainId 46630, Arbitrum Nitro Rollup (ArbOS 61).
robinhood_testnet = "${ROBINHOOD_TESTNET_RPC:-https://rpc.testnet.chain.robinhood.com}"
tangle_local = "${TANGLE_LOCAL_RPC}"
tangle_testnet = "${TANGLE_TESTNET_RPC}"
tangle_mainnet = "${TANGLE_MAINNET_RPC}"
tempo_testnet = "${TEMPO_TESTNET_RPC}"
tempo_mainnet = "${TEMPO_MAINNET_RPC}"
[etherscan]
sepolia = { key = "${SEPOLIA_KEY}" }
holesky = { key = "${HOLESKY_KEY}" }
base = { key = "${BASE_KEY}" }
base-sepolia = { key = "${BASE_SEPOLIA_KEY}" }
tangle_testnet = { key = "${TANGLE_TESTNET_KEY}", url = "https://testnet-explorer.tangle.tools" }
tangle_mainnet = { key = "${TANGLE_MAINNET_KEY}", url = "https://explorer.tangle.tools" }
# Both are Blockscout, which accepts an empty API key.
arc_testnet = { key = "", chain = 5042002, url = "https://testnet.arcscan.app/api/" }
robinhood_testnet = { key = "", chain = 46630, url = "https://explorer.testnet.chain.robinhood.com/api" }
[dependencies]
forge-std = "1.9.4"
"@openzeppelin-contracts" = "5.1.0"
"@openzeppelin-contracts-upgradeable" = "5.1.0"