-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathfoundry.toml
99 lines (78 loc) · 3.35 KB
/
foundry.toml
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
# Full reference https://github.com/foundry-rs/foundry/tree/master/config
# === Default Profile =========================================================
[profile.default]
solc = "0.8.15"
optimizer = true
optimizer_runs = 10_000
fuzz = {runs = 256}
fs_permissions = [{ access = "read", path = "./"}]
src="src"
libs = ["lib"]
out = "out"
test = "test"
gas_reports = ["*"]
auto_detect_solc = false
bytecode_hash = "none"
remappings = [
"@prb/test/=lib/prb-test/src/",
"forge-std/=lib/forge-std/src/",
"src/=src/",
"solmate/=lib/solmate/",
"@rari-capital/solmate/=lib/solmate/",
"@eth-optimism/contracts/=node_modules/@eth-optimism/contracts/",
"@eth-optimism/contracts-bedrock/=node_modules/@eth-optimism/contracts-bedrock/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"fx-portal/contracts/=lib/contracts/contracts/",
]
# Make formatting consistent.
[profile.default.fmt]
line_length = 100 # The maximum length of lines.
tab_width = 4 # Indent by two spaces for each level.
bracket_spacing = false # Don't put spaces between brackets and content.
int_types = "long" # Specify full integer type names.
# We want to optimise via the new optimiser backend for better results.
via_ir = true
# We can have quite some control over the optimiser when using the new IR one.
[profile.default.optimizer_details]
peephole = true # Enables the peephole optimisation.
inliner = true # Enables the inliner.
jumpdest_remover = true # Enables the elimination of jump destinations.
order_literals = true # Allows re-ordering literals in commutative ops.
deduplicate = true # Removes duplicate code blocks.
cse = true # Enables common subexpression elimination. Useful.
constant_optimizer = true # Computes some constant expressions at compile time.
yul = true # Enables the new ABI optimiser.
[profile.default.optimizer_details.yul_details]
stack_allocation = true # Improves allocation of stack slots for variables.
# === Debug Profile ===========================================================
[profile.debug]
# Make things chattier when debugging in case of test failures, giving us more
# information with which to debug the issue. At this level, stack traces and
# setup traces for failing tests are displayed.
verbosity = 3
[profile.ci]
fuzz = {runs = 10_000}
verbosity = 4
# === Test All Profile ========================================================
[profile.bench]
# We make the optimiser run a lot more for production, hoping to reduce our gas
# costs.
optimizer_runs = 20000
# Make things chattier when debugging in case of test failures, giving us more
# information with which to debug the issue. At this level, stack traces for
# failing tests are displayed.
verbosity = 3
# We can specify the contracts to track gas data for by tracing.
gas_reports = [
"WorldIDIdentityManager",
"MockWorldIDIdentityManager",
"Verifier",
]
# === Production Profile ======================================================
[profile.production]
# We make the optimiser run a lot more for production, hoping to reduce our gas
# costs.
fs_permissions = [{ access = "read", path = "./"}]
optimizer_runs = 20000