Skip to content

Commit

Permalink
Added foundry.toml defaults for testing and formatting (original cont…
Browse files Browse the repository at this point in the history
…racts not formatted)
  • Loading branch information
jferas committed Sep 25, 2024
1 parent 50f9282 commit 6e2a4e5
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 8 deletions.
6 changes: 3 additions & 3 deletions contracts/test/CompoundGovernor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Test, console2} from "forge-std/Test.sol";

// TODO: implement actual CompoundGovernor tests. This is just a placeholder to satisfy "forge test".
contract CompoundGovernorTest is Test {
function test() public pure {
assertEq(true, true);
}
function test() public pure {
assertEq(true, true);
}
}
54 changes: 49 additions & 5 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
[profile.default]
src = 'contracts'
out = 'out'
libs = ['node_modules', 'lib']
test = 'test'
cache_path = 'cache_forge'
src = 'contracts'
out = 'out'
libs = ['node_modules', 'lib']
test = 'test'
cache_path = 'cache_forge'
evm_version = "shanghai"
optimizer = true
optimizer_runs = 10_000_000
solc_version = "0.8.18"
verbosity = 3

[profile.ci]
fuzz = { runs = 5000 }
invariant = { runs = 1000 }

[profile.lite]
fuzz = { runs = 50 }
invariant = { runs = 10 }
# Speed up compilation and tests during development.
optimizer = false

[invariant]
call_override = false
depth = 100
dictionary_weight = 80
fail_on_revert = false
include_push_bytes = true
include_storage = true
optimizer = false
runs = 25

[fmt]
bracket_spacing = false
int_types = "long"
line_length = 120
multiline_func_header = "attributes_first"
number_underscore = "thousands"
quote_style = "double"
single_line_statement_blocks = "multi"
tab_width = 4
wrap_comments = true
ignore = [
"contracts/Comp.sol",
"contracts/GovernorBravo*.sol",
"contracts/SafeMath.sol",
"contracts/Timelock.sol",
"contracts/test/GovernorAlpha.sol",
"contracts/test/Multicall.sol"
]

0 comments on commit 6e2a4e5

Please sign in to comment.