-
Notifications
You must be signed in to change notification settings - Fork 208
Expand file tree
/
Copy pathfoundry.toml
More file actions
187 lines (158 loc) · 6.82 KB
/
foundry.toml
File metadata and controls
187 lines (158 loc) · 6.82 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
################################################################
# PROFILE: DEFAULT (local) #
################################################################
[profile.default]
src = 'src'
out = 'forge-artifacts'
script = 'scripts'
build_info_path = 'artifacts/build-info'
optimizer = true
optimizer_runs = 999999
# IMPORTANT:
# When adding any new compiler profiles or compilation restrictions, you must
# also update the restrictions in the "LITE" profile to match. This guarantees
# that builds will fully overwrite one another without needing to clean the
# entire build directory.
additional_compiler_profiles = [
{ name = "dispute", optimizer_runs = 5000 },
]
compilation_restrictions = [
{ paths = "src/dispute/DisputeGameFactory.sol", optimizer_runs = 5000 },
{ paths = "src/dispute/v2/FaultDisputeGameV2.sol", optimizer_runs = 5000 },
{ paths = "src/dispute/v2/PermissionedDisputeGameV2.sol", optimizer_runs = 5000 },
{ paths = "src/L1/OPContractsManager.sol", optimizer_runs = 5000 },
{ paths = "src/L1/OPContractsManagerStandardValidator.sol", optimizer_runs = 5000 },
{ paths = "src/L1/OptimismPortal2.sol", optimizer_runs = 5000 },
{ paths = "src/L1/SystemConfig.sol", optimizer_runs = 5000 },
{ paths = "src/universal/OptimismMintableERC20Factory.sol", optimizer_runs = 5000 },
{ paths = "src/dispute/AnchorStateRegistry.sol", optimizer_runs = 5000 },
{ paths = "src/dispute/DelayedWETH.sol", optimizer_runs = 5000 },
{ paths = "src/universal/ProxyAdmin.sol", optimizer_runs = 5000 },
{ paths = "src/universal/Proxy.sol", optimizer_runs = 5000 },
{ paths = "src/L2/OptimismMintableERC721.sol", optimizer_runs = 5000 },
{ paths = "src/L2/OptimismMintableERC721Factory.sol", optimizer_runs = 5000 },
]
extra_output = ['devdoc', 'userdoc', 'metadata', 'storageLayout']
bytecode_hash = 'none'
ast = true
evm_version = 'cancun'
remappings = [
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts',
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts',
'@openzeppelin/contracts-v5/=lib/openzeppelin-contracts-v5/contracts',
'openzeppelin/=lib/risc0-ethereum/lib/openzeppelin-contracts/',
'@rari-capital/solmate/=lib/solmate',
'@lib-keccak/=lib/lib-keccak/contracts/lib',
'solady/=lib/solady/src/',
'@solady/=lib/solady/src',
'@solady-v0.0.245/=lib/solady-v0.0.245/src',
'forge-std/=lib/forge-std/src',
'ds-test/=lib/forge-std/lib/ds-test/src',
'safe-contracts/=lib/safe-contracts/contracts',
'kontrol-cheatcodes/=lib/kontrol-cheatcodes/src',
'interfaces/=interfaces'
]
fs_permissions = [
{ access='read-write', path='./.resource-metering.csv' },
{ access='read-write', path='./snapshots/' },
{ access='read-write', path='./deployments/' },
{ access='read', path='./deploy-config/' },
{ access='read', path='./deploy-config-periphery/' },
{ access='read', path='./broadcast/' },
{ access='read', path = './forge-artifacts/' },
{ access='read-write', path='./.testdata/' },
{ access='read', path='./kout-deployment' },
{ access='read', path='./test/fixtures' },
{ access='read', path='./lib/superchain-registry/superchain/configs/' },
{ access='read', path='./lib/superchain-registry/validation/standard/' },
]
# 5159 error code is selfdestruct error code
# 2424 is deprecated natspec memory-safe-assembly comment (forge-std, solmate)
# 8429 is deprecated virtual modifiers (solmate)
ignored_error_codes = ["transient-storage", "code-size", "init-code-size", "too-many-warnings", 5159, 2424, 8429]
deny = "warnings"
ffi = true
# We set the gas limit to max int64 to avoid running out of gas during testing, since the default
# gas limit is 1B and some of our tests require more gas than that, such as
# test_callWithMinGas_noLeakageLow_succeeds. We use this gas limit since it was the default gas
# limit prior to https://github.com/foundry-rs/foundry/pull/8274. Due to toml-rs limitations, if
# you increase the gas limit above this value it must be a string.
gas_limit = 9223372036854775807
[fuzz]
runs = 64
[fmt]
line_length=120
multiline_func_header='all'
bracket_spacing=true
wrap_comments=true
[lint]
lint_on_build = false
################################################################
# PROFILE: CI #
################################################################
[profile.ci.fuzz]
runs = 128
[profile.ci.invariant]
runs = 64
depth = 32
################################################################
# PROFILE: CICOVERAGE #
################################################################
[profile.cicoverage]
optimizer = false
compilation_restrictions = []
[profile.cicoverage.fuzz]
runs = 1
[profile.cicoverage.invariant]
runs = 1
depth = 1
################################################################
# PROFILE: CIHEAVY #
################################################################
[profile.ciheavy.fuzz]
runs = 20000
timeout = 300
[profile.ciheavy.invariant]
runs = 128
depth = 512
timeout = 300
################################################################
# PROFILE: LITE #
################################################################
[profile.lite]
optimizer = false
optimizer_runs = 0
[profile.lite.fuzz]
runs = 8
[profile.lite.invariant]
runs = 8
depth = 8
# IMPORTANT:
# See the info in the "DEFAULT" profile to understand this section.
additional_compiler_profiles = [
{ name = "dispute", optimizer_runs = 0 },
]
compilation_restrictions = [
{ paths = "src/dispute/DisputeGameFactory.sol", optimizer_runs = 0 },
{ paths = "src/dispute/v2/FaultDisputeGameV2.sol", optimizer_runs = 0 },
{ paths = "src/dispute/v2/PermissionedDisputeGameV2.sol", optimizer_runs = 0 },
{ paths = "src/L1/OPContractsManager.sol", optimizer_runs = 0 },
{ paths = "src/L1/OPContractsManagerStandardValidator.sol", optimizer_runs = 0 },
{ paths = "src/L1/OptimismPortal2.sol", optimizer_runs = 0 },
{ paths = "src/L1/SystemConfig.sol", optimizer_runs = 0 },
{ paths = "src/universal/OptimismMintableERC20Factory.sol", optimizer_runs = 0 },
{ paths = "src/dispute/AnchorStateRegistry.sol", optimizer_runs = 0 },
{ paths = "src/dispute/DelayedWETH.sol", optimizer_runs = 0 },
{ paths = "src/universal/ProxyAdmin.sol", optimizer_runs = 0 },
{ paths = "src/universal/Proxy.sol", optimizer_runs = 0 },
{ paths = "src/L2/OptimismMintableERC721.sol", optimizer_runs = 0 },
{ paths = "src/L2/OptimismMintableERC721Factory.sol", optimizer_runs = 0 },
]
################################################################
# PROFILE: KONTROL #
################################################################
[profile.kprove]
src = 'test/kontrol/proofs'
out = 'kout-proofs'
test = 'test/kontrol/proofs'
script = 'test/kontrol/proofs'