Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
formatting: Update to improve readability (#467)
Browse files Browse the repository at this point in the history
No functionality changes.

- Update foundry.toml to declare verbosity and set up mainnet caching.
- Remove optimizer in normal testing to speed up compilation times during development (Recommend using optimizer profile in CI).
- Formatting across all contracts to be audited (not including tests)
- Remove `forge clean` in test commands since only changed files are compiled, its not necessary.

`develop` test time:
`make test  61.74s user 1.87s system 132% cpu 47.952 total`

Branch test time:
`make test  36.23s user 1.98s system 108% cpu 35.246 total`
  • Loading branch information
Lucas Manuel authored Jan 1, 2023
1 parent 4149894 commit 3c5cabb
Show file tree
Hide file tree
Showing 21 changed files with 501 additions and 334 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"editor.formatOnSave": false,
"solidity.formatter": "prettier",
"solidity.compileUsingLocalVersion": "latest",
"python.formatting.provider": "black"
}
"python.formatting.provider": "black",
"solidity.compileUsingRemoteVersion": "v0.8.14+commit.80d49f37"
}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ install :; git submodule update --init --recursive
build :; forge clean && forge build

# Tests
test :; forge clean && forge test -v --no-match-test testLoad # --ffi # enable if you need the `ffi` cheat code on HEVM
test-with-gas-report :; forge clean && forge build && forge test -v --no-match-test testLoad --gas-report # --ffi # enable if you need the `ffi` cheat code on HEVM
test-load :; forge clean && forge build && forge test -vv --match-test testLoad --gas-report
test :; forge test --no-match-test testLoad # --ffi # enable if you need the `ffi` cheat code on HEVM
test-with-gas-report :; FOUNDRY_PROFILE=optimized forge test --no-match-test testLoad --gas-report # --ffi # enable if you need the `ffi` cheat code on HEVM
test-load :; FOUNDRY_PROFILE=optimized forge test --match-test testLoad --gas-report
coverage :; forge coverage --no-match-test testLoad

# Generate Gas Snapshots
Expand Down
16 changes: 11 additions & 5 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[profile.default]
src = 'src'
src = 'src'
test = 'tests/forge'
out = 'forge_out'
out = 'forge_out'
libs = ['lib']
remappings = [
'@solmate=lib/solmate/src/',
Expand All @@ -12,9 +12,15 @@ remappings = [
'@base64-sol=lib/base64/',
'src/=src/'
]
block_timestamp = 0
optimizer = true
verbosity = 3
block_timestamp = 1_672_372_127
block_number = 16_295_000
fork_block_number = 16_295_000
rpc_storage_caching = { chains = ["mainnet"], endpoints = "all" }

[profile.optimized]
optimizer = true
optimizer_runs = 200

[fuzz]
runs = 300
runs = 300
Loading

0 comments on commit 3c5cabb

Please sign in to comment.