-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathfoundry.toml
More file actions
161 lines (148 loc) · 10.5 KB
/
Copy pathfoundry.toml
File metadata and controls
161 lines (148 loc) · 10.5 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
[profile.default]
ffi = true
# Carrying the AST doubles the size of `out/`, which CI caches.
ast = false
# Pinned so that every machine compiles with the same compiler. Without an explicit version, Forge
# resolves each source file to the newest installed compiler that satisfies its pragma, so a
# developer and CI diverge silently. Forge cannot auto-resolve a release newer than the list built
# into its binary, but an explicitly pinned version is fetched from the live release list on demand.
solc_version = "0.8.36"
# Forge 1.8.1 defaults to the osaka EVM version. Pin the target that the deployment chains run.
evm_version = "prague"
legacy_assertions = true
assertions_revert = false
fs_permissions = [
{ access = "write", path = "./src/test/sim/out/" },
{ access = "read-write", path = "./deployments/" },
{ access = "read", path = "./src/scripts/" },
{ access = "read", path = "./src/proposals/addresses.json" },
{ access = "read-write", path = "./src/scripts/env.json" },
{ access = "read-write", path = "./src/scripts/lz-bridge-testnet/deployments/" },
]
gas_limit = "18446744073709551615"
# Run each top-level test call as a separate transaction so account and storage access costs match
# production execution. Keeping this explicit also gives Forge 1.7 and 1.8 the same test semantics.
# `forge script` honors the same key, so a simulated call is charged the way the broadcast
# transaction is.
# The `deploy` profile also produces the gas snapshots, so needs isolation (inherited).
isolate = true
# Everyday builds favor compile speed. Use the deploy profile whenever producing bytecode for
# deployment or checking contract sizes.
optimizer = false
verbosity = 2
# Gas snapshots must use deployment-equivalent bytecode. Use `pnpm run test:gas`, or set
# `FOUNDRY_PROFILE=deploy` when running Forge snapshot commands directly.
gas_snapshot_emit = false
# These source graphs do not compile without the optimizer because solc exhausts the EVM stack while
# generating their ABI encoding/decoding assembly.
additional_compiler_profiles = [{ name = "optimized", optimizer = true, optimizer_runs = 400 }]
compilation_restrictions = [
{ paths = "src/external/governance/GovernorBravoDelegate.sol", optimizer_runs = 400 },
{ paths = "src/policies/BondCallback.sol", optimizer_runs = 400 },
{ paths = "src/policies/BoostedLiquidity/BLVaultLido.sol", optimizer_runs = 400 },
{ paths = "src/policies/BoostedLiquidity/BLVaultLusd.sol", optimizer_runs = 400 },
{ paths = "src/policies/BoostedLiquidity/BLVaultManagerLido.sol", optimizer_runs = 400 },
{ paths = "src/policies/BoostedLiquidity/BLVaultManagerLusd.sol", optimizer_runs = 400 },
{ paths = "src/proposals/*.sol", optimizer_runs = 400 },
# Upstream LayerZero test graphs fail legacy code generation unoptimized. Keeping this at the
# dependency roots avoids optimizer exceptions for individual repository test files.
{ paths = "dependencies/@layerzerolabs-*/**", optimizer_runs = 400 },
{ paths = "dependencies/forge-proposal-simulator-1.0.1/**", optimizer_runs = 400 },
]
libs = ["dependencies"]
# Tests live here, not in the default `test` directory. While this pointed at a directory that does
# not exist, Forge replaced the `test/=src/test/` entry of remappings.txt with narrower generated
# ones covering only the subdirectories that happen to exist, so an import from any new subdirectory
# of src/test failed to resolve.
test = "src/test"
# Drops warnings originating in the dependencies from solc output. Post-processing only: it cannot
# restore warnings solc discarded at its own limit of 256 per invocation, which applies separately
# to each compilation job Forge runs.
ignored_warnings_from = ["dependencies", "deprecated"]
[profile.deploy]
optimizer = true
optimizer_runs = 400
gas_snapshot_emit = true
# The whole deployment graph already uses these settings, so the everyday-build exceptions would
# only split this profile into redundant compiler jobs.
additional_compiler_profiles = []
compilation_restrictions = []
script_execution_protection = false
[profile.multisig]
script_execution_protection = false
# Used by `forge coverage`, which recompiles from scratch every run and keeps nothing in `out/`.
[profile.coverage]
# The report is the output; test traces are not.
verbosity = 0
# A coverage run must not rewrite the tracked gas snapshots, which are measured under the settings
# of a normal build.
gas_snapshot_emit = false
# Coverage output is long enough without solc warnings.
ignored_warnings_from = ["dependencies", "src"]
# Emptied so that coverage compiles in a single job. The Operator restriction otherwise adds a
# second job carrying the same compiler version, and coverage items of two such jobs are
# misattributed between files.
compilation_restrictions = []
# Coverage needs each line reached once, not a wide search. A `forge-config` comment in a test file
# overrides both of the sections below, and the command line does not override that comment either,
# so suites carrying one keep their own counts.
[profile.coverage.fuzz]
runs = 8
[profile.coverage.invariant]
runs = 1
depth = 15
# Hides the per-selector call table that every invariant suite would otherwise print.
show_metrics = false
[fuzz]
runs = 256
[invariant]
# Forge 1.7 ran one campaign per invariant function and spread those across the test thread pool.
# 1.8 runs one campaign per invariant suite with the `auto` default, so
# set 4 workers to speed up the suite.
# Override with `--invariant-workers` locally.
workers = 4
[lint]
exclude_lints = ["asm-keccak256", "mixed-case-variable", "mixed-case-function"]
# Builds do not print lint diagnostics. `forge lint`, which CI runs, still reports all of them.
lint_on_build = false
[rpc_endpoints]
# Place ALCHEMY_API_KEY in the environment or .env file
mainnet = { endpoint = "https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
sepolia = { endpoint = "https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
base = { endpoint = "https://base-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
base-sepolia = { endpoint = "https://base-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
arbitrum = { endpoint = "https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
arbitrum-sepolia = { endpoint = "https://arb-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
optimism = { endpoint = "https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
optimism-sepolia = { endpoint = "https://opt-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
polygon = { endpoint = "https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
polygon-amoy = { endpoint = "https://polygon-amoy.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
berachain = { endpoint = "https://berachain-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
berachain-bepolia = { endpoint = "https://berachain-bepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}", retries = 3, retry_backoff = 10000, compute_units_per_second = 500 }
[soldeer]
remappings_generate = false
[dependencies]
surl = { version = "1.0.0", git = "https://github.com/memester-xyz/surl.git", rev = "034c912ae9b5e707a5afd21f145b452ad8e800df" }
base64 = { version = "1.1.0", git = "https://github.com/Brechtpd/base64.git", rev = "4d85607b18d981acff392d2e99ba654305552a97" }
chainlink-ccip = { version = "1.6.0", git = "https://github.com/smartcontractkit/chainlink.git", rev = "5dd09706665ee0073f8db7d5ec6e5c97eb44fb69" }
chainlink-local = { version = "0.2.5", git = "https://github.com/smartcontractkit/chainlink-local.git", rev = "b429481536095867f9cd2c6480066c472b9594de" }
forge-std = "1.16.2"
safe-utils = { version = "0.0.17", git = "https://github.com/Recon-Fuzz/safe-utils.git", rev = "c057d167139dc4878f10ab7133a8c069fa6b1601" }
base58-solidity = { version = "1.0.3", git = "https://github.com/storyicon/base58-solidity.git", rev = "2b56a9a42456ba18e79e4a8a0b541c0d7fb61b6f" }
clones-with-immutable-args = { version = "1.1.2", git = "https://github.com/wighawag/clones-with-immutable-args.git", rev = "196f1ecc6485c1bf2d41677fa01d3df4927ff9ce" }
# Used at CrossChainBridge deploy; EVM bytecode identical to 1.1.0, only metadata hash differs
# layer-zero-endpoint-v1-006 = { version = "0.0.6", git = "https://github.com/LayerZero-Labs/endpoint-v1-solidity-examples.git", rev = "a4954e5747baca5e7fd2b62c639e7600ad388a5f" }
layer-zero-endpoint-v1-110 = { version = "1.1.0", git = "https://github.com/LayerZero-Labs/endpoint-v1-solidity-examples.git", rev = "cdc93994911829b1348f6ac18000000a43432ef1" }
solmate = { version = "6.2.0", git = "https://github.com/transmissions11/solmate.git", rev = "fadb2e2778adbf01c80275bfb99e5c14969d964b" }
openzeppelin = { version = "4.8.0", git = "https://github.com/OpenZeppelin/openzeppelin-contracts.git", rev = "49c0e4370d0cc50ea6090709e3835a3091e33ee2" }
openzeppelin-new = { version = "5.3.0", git = "https://github.com/OpenZeppelin/openzeppelin-contracts.git", rev = "e4f70216d759d8e6a64144a9e1f7bbeed78e7079" }
forge-proposal-simulator = { version = "1.0.1", git = "https://github.com/OlympusDAO/forge-proposal-simulator.git", rev = "76374f3bf3b032dfb5c685c5a969ca20d0776384" }
safe-smart-account = { version = "1.4.1", git = "https://github.com/safe-global/safe-smart-account.git", rev = "bf943f80fec5ac647159d26161446ac5d716a294" }
solidity-http = { version = "0.0.7", git = "https://github.com/Recon-Fuzz/solidity-http.git", rev = "c1bdafefa34e4a5e581f4227dfed4efecc0d6d0e" }
"@layerzerolabs-lz-evm-messagelib-v2" = "3.0.162"
"@layerzerolabs-lz-evm-protocol-v2" = "3.0.162"
"@layerzerolabs-oapp-evm" = "0.4.1"
"@layerzerolabs-test-devtools-evm-foundry" = "8.0.1"
"@layerzerolabs-lz-evm-v1-0-7" = "3.0.162"
uniswap-v3-core = { version = "1.0.1", git = "https://github.com/Uniswap/v3-core.git", rev = "6562c52e8f75f0c10f9deaf44861847585fc8129" }
uniswap-v3-periphery = { version = "1.4.2", git = "https://github.com/Uniswap/v3-periphery.git", rev = "b325bb0905d922ae61fcc7df85ee802e8df5e96c" }