forked from worldcoin/world-id-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
foundry.toml
80 lines (65 loc) · 2.86 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
# === Default Profile =========================================================
[profile.default]
src = 'src'
out = 'out'
libs = ['lib']
ffi = true
# Here we need some specific remappings.
remappings = [
'ds-test/=lib/ds-test/src/',
'@zk-kit/=lib/zk-kit/packages/',
'openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/',
'contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/',
'semaphore/=lib/semaphore/packages/contracts/contracts/'
]
# The default is to optimise, but let's be clear about it.
optimizer = true
# 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
# === 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",
"WorldIdIdentityManagerImplV1",
"Verifier",
"WorldIDRouter",
"WorldIDRouterImplV1",
"VerifierLookupTable"
]
# === Production Profile ======================================================
[profile.production]
# We make the optimiser run a lot more for production, hoping to reduce our gas
# costs.
optimizer_runs = 20000