Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up testing by turning off optimizer on dev mode #272

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions packages/1155-contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,15 @@ libs = ['_imagine', 'node_modules', 'script']
allow_paths = ["node_modules/@zoralabs/protocol-rewards"]
optimizer = true
optimizer_runs = 50
out = 'out'
solc_version = '0.8.17'
src = 'src'
via_ir = true

[profile.optimized]
optimizer = true
optimizer_runs = 50
out = 'out'
script = 'src'
solc_version = '0.8.17'
out = 'out'
src = 'src'
test = 'src'
via_ir = true

[profile.fast_compilation]
optimizer_runs = 50
[profile.dev]
optimizer = false
optimizer_runs = 0
via_ir = false
solc_version = '0.8.17'

[rpc_endpoints]
goerli = "https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}"
Expand Down
2 changes: 1 addition & 1 deletion packages/1155-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "module",
"scripts": {
"test": "forge test",
"dev": "forge test --watch -vvv",
"dev": "FOUNDRY_PROFILE=dev forge test --watch -vvv",
"test:fork": "forge test -vvv --match-test fork",
"test-gas": "forge test --gas-report",
"prettier:check": "prettier --check 'src/**/*.sol' 'test/**/*.sol' 'package/**/*.ts' 'wagmi.config.ts'",
Expand Down
13 changes: 4 additions & 9 deletions packages/protocol-rewards/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ script = 'script'
src = 'src'
via_ir = true

[profile.optimized]
auto_detect_solc = true
optimizer = true
optimizer_runs = 500000
out = 'out'
script = 'src'
src = 'src'
test = 'src'
via_ir = true
[profile.dev]
optimizer = false
optimizer_runs = 0
via_ir = false

[fmt]
bracket_spacing = true
Expand Down
1 change: 1 addition & 0 deletions packages/protocol-rewards/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"scripts": {
"build": "forge build",
"build:sizes": "forge build --sizes",
"dev": "FOUNDRY_PROFILE=dev forge test --watch -vvv",
"test": "forge test",
"build:contracts": "forge build",
"prettier:check": "prettier --check 'src/**/*.sol' 'test/**/*.sol' 'script/**/*.sol'",
Expand Down
Loading