Repository navigation
Expand file tree
/
Copy pathfoundry.toml
More file actions
171 lines (164 loc) · 7.11 KB
/
Copy pathfoundry.toml
File metadata and controls
171 lines (164 loc) · 7.11 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
[profile.default]
src = "./contracts/src"
# OZ Upgrades requires the out dir to be `./out`, or for `FOUNDRY_OUT` to be set
# https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades/blob/cfd861bc18ef4737e82eae6ec75304e27af699ef/src/internal/Utils.sol#L139-L147
out = "./out"
fs_permissions = [
{ access = "read", path = "./out" },
{ access = "read", path = "./contracts/out" },
{ access = "read-write", path = "./contracts/deployment.toml" },
{ access = "read", path = "./contracts/deployment_verifier.toml" },
{ access = "read-write", path = "./contracts/deployment-version-registry.toml" },
]
libs = ["./lib"]
script = "./contracts/scripts"
test = "./contracts/test"
# EVM-version-divergent imports are routed through dedicated remapping prefixes so the shanghai
# profile can swap them (see [profile.shanghai]):
# - bytes-compat/ -> OpenZeppelin Bytes (mcopy) here; a no-mcopy shim under shanghai
# - boundless-market/ -> the transient-storage market here; a persistent-storage variant under
# shanghai (the market is the one contract whose body must differ)
# Defined here in config rather than remappings.txt because a profile cannot override a
# remappings.txt entry. Profiles that compile contracts/src but do not set their own `remappings`
# (povw-deploy, reference-contract, deployment-test) inherit these from the default profile.
remappings = [
"bytes-compat/=lib/openzeppelin-contracts/contracts/utils/",
"boundless-market/=contracts/src/",
"boundless-market-legacy/=contracts/src/legacy/",
]
ffi = true
evm_version = 'cancun'
via_ir = true
optimizer = true
# Use 100 runs only to reduce contract size.
optimizer_runs = 100
ast = true
build_info = true
extra_output = ["storageLayout"]
gas_reports = ["BoundlessMarket"]
solc_version = "0.8.26"
# Do not append metadata hash to bytecode. We do not currently use it, and omitting it results in
# more stable build artifacts, which is important since we check the bytecode into git.
# For information about Solidity metadata, see https://docs.soliditylang.org/en/latest/metadata.html
bytecode_hash = "none"
snapshots = "contracts/snapshots"
isolate = true
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
[fmt]
line_length = 120
tab_width = 4
quote_style = "double"
ignore = ["contracts/src/blake3-groth16/Groth16Verifier.sol"]
[lint]
exclude_lints = ["asm-keccak256", "incorrect-shift"]
# Profile used to run deployment tests, which check the correctness of contracts as deployed.
# TIP: You can select this profile by setting env var FOUNDRY_PROFILE=deployment-test
[profile.deployment-test]
test = "contracts/deployment-test"
#match_path = "contracts/deployment-test/*"
fs_permissions = [
{ access = "read", path = "contracts/deployment.toml" },
{ access = "read", path = "contracts/deployment_verifier.toml" },
]
isolate = true
# Profile used for deploying PoVW contracts with higher optimization
# TIP: You can select this profile by setting env var FOUNDRY_PROFILE=povw-deploy
[profile.povw-deploy]
src = "./contracts/src"
out = "./out"
fs_permissions = [
{ access = "read", path = "./out" },
{ access = "read", path = "./contracts/out" },
{ access = "read-write", path = "./contracts/deployment.toml" },
]
libs = ["./lib"]
script = "./contracts/scripts"
test = "./contracts/test"
ffi = true
evm_version = 'cancun'
via_ir = true
optimizer = true
# Use higher optimization runs for PoVW deployments to reduce gas costs
optimizer_runs = 1000000
ast = true
build_info = true
extra_output = ["storageLayout"]
solc_version = "0.8.26"
bytecode_hash = "none"
isolate = true
# Profile used to run upgradeability tests.
# TIP: You can select this profile by setting env vars FOUNDRY_PROFILE=reference-contract and FOUNDRY_OUT="contracts/reference-contract/out"
[profile.reference-contract]
src = "contracts/src"
out = "contracts/reference-contract/out"
test = "contracts/reference-contract/test"
libs = ["lib"]
ffi = true
ast = true
build_info = true
extra_output = ["storageLayout"]
fs_permissions = [
{ access = "read", path = "contracts/reference-contract/out" },
]
# Profile for the Shanghai-compatible contract variant (no tstore/tload/mcopy).
# Compiles the SAME ./contracts/src tree as the default profile, except the EVM-version-divergent
# files, which are swapped via the remappings below:
# - bytes-compat/ -> contracts/shanghai/compat/Bytes.sol (no mcopy)
# - boundless-market/ -> contracts/shanghai/variants/BoundlessMarket.sol (persistent storage +
# explicit FulfillmentContext.clear, importing the sstore variant)
# The Cancun-only originals (the transient-storage market + its FulfillmentContext) are skipped so
# they aren't compiled under the Shanghai EVM. The mainline legacy tree is Cancun-only and frozen;
# it is skipped here too (Taiko carries its own frozen legacy under contracts/shanghai/legacy).
# TIP: You can select this profile by setting env var FOUNDRY_PROFILE=shanghai
[profile.shanghai]
src = "./contracts/src"
out = "./out-shanghai"
# Separate gas-snapshot dir so shanghai test runs don't clobber the default profile's cancun
# snapshots under contracts/snapshots (gitignored — the shanghai variant has no snapshot CI gate).
snapshots = "./out-shanghai/snapshots"
libs = ["./lib"]
script = "./contracts/scripts"
test = "./contracts/test"
remappings = [
"bytes-compat/=contracts/shanghai/compat/",
"boundless-market/=contracts/shanghai/variants/",
"boundless-market-legacy/=contracts/shanghai/legacy/",
]
skip = [
"contracts/src/legacy/**",
"contracts/src/BoundlessMarket.sol",
"contracts/src/types/FulfillmentContext.sol",
# The Cancun/Base legacy ABI test suites exercise the mainline frozen legacy (tstore); the
# Taiko legacy is covered by the bytecode/storage parity checks instead.
"contracts/test/legacy/**",
# Unit test for the transient-storage FulfillmentContext library (uses tstore directly). The
# shanghai sstore/clear variant's behaviour is exercised end-to-end by the price-then-fulfill
# paths in BoundlessMarket.t.sol, which run under this profile.
"contracts/test/types/FulfillmentContext.t.sol",
# PoVW is a separate contract suite (rewards), not part of the market router work, and its zkc
# Supply library uses transient storage. It is out of scope for the Taiko market port; skip the
# PoVW contracts and their deploy scripts under shanghai.
"contracts/src/povw/**",
"contracts/scripts/Deploy.PoVW.s.sol",
"contracts/scripts/Manage.PoVW.s.sol",
# ZKC test fixtures pull in the transient zkc Supply library; only PoVW tests use them.
"contracts/test/MockZKC.sol",
"contracts/test/TestUtilsZKC.sol",
]
ffi = true
evm_version = 'shanghai'
via_ir = true
optimizer = true
optimizer_runs = 100
ast = true
build_info = true
extra_output = ["storageLayout"]
solc_version = "0.8.26"
bytecode_hash = "none"
isolate = true
fs_permissions = [
{ access = "read", path = "./out-shanghai" },
{ access = "read", path = "./contracts/out" },
{ access = "read-write", path = "./contracts/deployment.toml" },
{ access = "read", path = "./contracts/deployment_verifier.toml" },
]