Skip to content

Commit 4db5414

Browse files
committed
enhanced foundry compiler settings
1 parent 5ed6a86 commit 4db5414

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

compiler_config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"settings": {
44
"optimizer": {
55
"enabled": true,
6-
"runs": 200000,
6+
"runs": 100000,
77
"details": {
88
"orderLiterals": true,
99
"deduplicate": true,
@@ -22,6 +22,6 @@
2222
"*": ["abi", "metadata", "devdoc", "userdoc", "storageLayout", "evm.legacyAssembly", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers", "evm.gasEstimates", "evm.assembly"]
2323
}
2424
},
25-
"evmVersion": "byzantium"
25+
"evmVersion": "london"
2626
}
2727
}

foundry.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,35 @@ out = 'out'
44
libs = ['node_modules', 'lib']
55
test = 'src/foundry/test/'
66
cache_path = 'forge-cache'
7+
8+
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
9+
10+
solc_version = "0.8.17"
11+
gas_reports = ["*"]
12+
13+
# settings for coverage reports
14+
via_ir = true
15+
optimizer = true #testing this out - was false
16+
optimizer_runs = 100_000
17+
18+
19+
[profile.default.optimizer_details]
20+
jumpdestRemover = true
21+
orderLiterals = true
22+
deduplicate = true
23+
24+
yul = true
25+
constantOptimizer = true
26+
stackAllocation = true
27+
28+
# Have `cse = true` commented out for faster testing compilation,
29+
### but UNCOMMENT it for DEPLOYMENT! ###
30+
cse = true
31+
32+
33+
[profile.default.optimizer_details.yulDetails]
34+
stackAllocation = true
35+
36+
# Have `optimizerSteps = ""` uncommented for faster testing compilation,
37+
### but COMMENT IT out for DEPLOYMENT!###
38+
# optimizerSteps = ""

0 commit comments

Comments
 (0)