-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ScopeLift foundry default settings to repo (#14)
* Configured foundry/hardhat compatibility * Add empty placeholder governor and test contract to verify forge install is working * Added foundry.toml defaults for testing and formatting (original contracts not formatted) * Add forge install to test.yml * Updated hardhat plugin to latest to resolve coverage issue * Switched proposer address in fork tests to one with some voting power * prettier fix .. need for this triggered by previous commit ts file change
- Loading branch information
1 parent
15614c9
commit b7fbd77
Showing
16 changed files
with
11,848 additions
and
5,947 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ artifacts | |
yarn-error.log | ||
.DS_Store | ||
yarn.lock | ||
cache_forge | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
pragma solidity 0.8.18; | ||
|
||
// TODO: Implement new governance contract for Compound. This is just a placeholder to satisfy "forge fmt". | ||
contract CompoundGovernor {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
pragma solidity 0.8.18; | ||
|
||
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[profile.default] | ||
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" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.