Skip to content

Commit 8088145

Browse files
authored
Merge pull request #94 from morpho-dao/fix/setup
Propagate morpho-v1 setup
2 parents 84f5cf3 + e7811c0 commit 8088145

29 files changed

+49
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ yarn-error.log*
3131
/.vscode
3232

3333
# test
34-
/test/output-tree-structure.txt
34+
/test-ts/output-tree-structure.txt
35+
*.ansi

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
-include .env.local
2+
.EXPORT_ALL_VARIABLES:
3+
MAKEFLAGS += --no-print-directory
4+
5+
6+
install:
7+
yarn
8+
foundryup
9+
git submodule update --init --recursive
10+
11+
contracts:
12+
FOUNDRY_TEST=/dev/null forge build --sizes --force
13+
14+
test:
15+
@echo Running tests with seed \"${FOUNDRY_FUZZ_SEED}\",\
16+
match contract patterns \"\(${FOUNDRY_MATCH_CONTRACT}\)!${FOUNDRY_NO_MATCH_CONTRACT}\",\
17+
match test patterns \"\(${FOUNDRY_MATCH_TEST}\)!${FOUNDRY_NO_MATCH_TEST}\"
18+
19+
forge test -vvv | tee trace.ansi
20+
21+
test-%:
22+
@FOUNDRY_MATCH_TEST=$* make test
23+
24+
contract-% c-%:
25+
@FOUNDRY_MATCH_CONTRACT=$* make test
26+
27+
coverage:
28+
@echo Create lcov coverage report
29+
forge coverage --report lcov
30+
lcov --remove lcov.info -o lcov.info "test/*"
31+
32+
lcov-html:
33+
@echo Transforming the lcov coverage report into html
34+
genhtml lcov.info -o coverage
35+
36+
37+
.PHONY: test coverage contracts

foundry.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[profile.default]
2-
src = "contracts"
3-
test = "test-foundry"
42
solc_version = "0.8.17"
53

4+
[fuzz]
5+
runs = 1024
6+
67
[invariant]
78
runs = 256
89
depth = 64

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
"name": "morpho-data-structures",
33
"version": "1.0.0",
44
"description": "Data structures for Morpho's matching engine",
5-
"main": "hardhat.config.js",
65
"repository": "https://github.com/morpho-protocol/morpho-data-structures.git",
76
"author": "MerlinEgalite <[email protected]>",
87
"license": "MIT",
98
"scripts": {
10-
"test": "npx hardhat test",
9+
"test": "npx hardhat test test-ts/*.ts",
1110
"coverage": "npx hardhat coverage",
1211
"lint": "yarn run lint:sol && yarn run lint:js",
1312
"lint:ts": "eslint . --ext .ts",

remappings.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@openzeppelin/=node_modules/@openzeppelin/
2-
@contracts/=contracts/
32
forge-std/=lib/forge-std/src/
43
ds-test/=lib/ds-test/src/
54
hardhat/=node_modules/hardhat/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)