-
Notifications
You must be signed in to change notification settings - Fork 48
/
foundry.toml
148 lines (135 loc) · 4.8 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
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
[profile.default]
auto_detect_solc = false
bytecode_hash = "none"
evm_version = "shanghai"
fs_permissions = [
{ access = "read", path = "./out-optimized" },
{ access = "read", path = "package.json" },
{ access = "read-write", path = "./benchmark/results" },
]
gas_limit = 9223372036854775807
gas_reports = [
"SablierV2LockupDynamic",
"SablierV2LockupLinear",
"SablierV2LockupTranched",
"SablierV2NFTDescriptor",
]
optimizer = true
optimizer_runs = 1000
out = "out"
script = "script"
sender = "0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38"
solc = "0.8.26"
src = "src"
test = "test"
[profile.default.fuzz]
max_test_rejects = 1_000_000 # Number of times `vm.assume` can fail
runs = 50
[profile.default.invariant]
call_override = false # Override unsafe external calls to perform reentrancy checks
depth = 20 # Number of calls executed in one run
fail_on_revert = true
runs = 20
# Run only the code inside benchmark directory
[profile.benchmark]
test = "benchmark"
# Speed up compilation and tests during development
[profile.lite]
optimizer = false
# Compile only the production code and the test mocks with via IR
[profile.optimized]
out = "out-optimized"
test = "test/mocks"
via_ir = true
# See "SMTChecker and Formal Verification" in the Solidity docs
[profile.smt]
ignored_error_codes = [
7737, # Disable inline assembly warnings
]
out = "out-optimized"
script = "src"
test = "src"
via_ir = true
[profile.smt.model_checker]
engine = "chc" # constrained Horn clauses
invariants = ["contract", "reentrancy"]
show_proved_safe = true
show_unproved = true
show_unsupported = true
timeout = 100_000 # in milliseconds, per solving query
targets = [
"assert",
"constantCondition",
"divByZero",
"outOfBounds",
"overflow",
"underflow",
]
[profile.smt.model_checker.contracts]
"src/SablierV2LockupDynamic.sol" = ["SablierV2LockupDynamic"]
"src/SablierV2LockupLinear.sol" = ["SablierV2LockupLinear"]
"src/SablierV2LockupTranched.sol" = ["SablierV2LockupTranched"]
"src/SablierV2NFTDescriptor.sol" = ["SablierV2NFTDescriptor"]
# Test the optimized contracts without re-compiling them
[profile.test-optimized]
src = "test"
[doc]
ignore = ["**/*.t.sol"]
out = "docs"
repository = "https://github.com/sablier-labs/v2-core"
[etherscan]
arbitrum = { key = "${ARBISCAN_API_KEY}" }
arbitrum_sepolia = { key = "${ARBISCAN_API_KEY}" }
avalanche = { key = "${SNOWTRACE_API_KEY}" }
base = { key = "${BASESCAN_API_KEY}" }
base_sepolia = { key = "${BASESCAN_API_KEY}" }
berachain_artio = { key = "verifyContract", url = "https://api.routescan.io/v2/network/testnet/evm/80085/etherscan" }
bnb = { key = "${BSCSCAN_API_KEY}" }
gnosis = { key = "${GNOSISSCAN_API_KEY}" }
linea = { key = "${LINEASCAN_API_KEY}" }
linea_sepolia = { key = "${LINEASCAN_API_KEY}" }
mainnet = { key = "${ETHERSCAN_API_KEY}" }
mode = { key = "verifyContract", url = "https://explorer.mode.network/api?" }
mode_sepolia = { key = "verifyContract", url = "https://sepolia.explorer.mode.network/api?" }
optimism = { key = "${OPTIMISTIC_API_KEY}" }
optimism_sepolia = { key = "${OPTIMISTIC_API_KEY}" }
polygon = { key = "${POLYGONSCAN_API_KEY}" }
scroll = { key = "${SCROLLSCAN_API_KEY}" }
sei = { key = "verifyContract", url = "https://seitrace/pacific-1/api?" }
sei_testnet = { key = "verifyContract", url = "https://blockscout.com/poa/core/api?" }
sepolia = { key = "${SEPOLIASCAN_KEY}" }
taiko_hekla = { key = "verifyContract", url = "https://blockscoutapi.hekla.taiko.xyz/api?" }
taiko_mainnet = { key = "${TAIKO_MAINNET_API_KEY}" }
[fmt]
bracket_spacing = true
int_types = "long"
line_length = 120
multiline_func_header = "all"
number_underscore = "thousands"
quote_style = "double"
tab_width = 4
wrap_comments = true
[rpc_endpoints]
arbitrum = "${ARBITRUM_RPC_URL}"
arbitrum_sepolia = "https://arbitrum-sepolia.blockpi.network/v1/rpc/public"
avalanche = "${AVALANCHE_RPC_URL}"
base = "https://mainnet.base.org"
base_sepolia = "https://sepolia.base.org"
berachain_artio = "https://bartio.rpc.berachain.com/"
bnb = "https://bsc-dataseed.binance.org"
gnosis = "https://rpc.gnosischain.com"
linea = "https://rpc.linea.build"
linea_sepolia = "https://rpc.sepolia.linea.build"
localhost = "http://localhost:8545"
mainnet = "${MAINNET_RPC_URL}"
mode = "https://mainnet.mode.network/"
mode_sepolia = "https://sepolia.mode.network/"
optimism = "${OPTIMISM_RPC_URL}"
optimism_sepolia = "https://sepolia.optimism.io"
polygon = "${POLYGON_RPC_URL}"
scroll = "https://rpc.scroll.io/"
sei = "https://evm-rpc.sei-apis.com"
sei_testnet = "https://evm-rpc.arctic-1.seinetwork.io"
sepolia = "${SEPOLIA_RPC_URL}"
taiko_hekla = "https://rpc.hekla.taiko.xyz"
taiko_mainnet = "https://rpc.mainnet.taiko.xyz"