Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit c0438a9

Browse files
authored
Remove dependencies and move from dapp to forge (#97)
* dapp uninstall clipper-mom * dapp uninstall ds-math * dapp uninstall ds-proxy * dapp uninstall dss * dapp uninstall dss-auto-line * dapp uninstall dss-chain-log * dapp uninstall dss-direct-deposit * dapp uninstall dss-lerp * dapp uninstall flipper-mom * dapp uninstall ilk-registry * dapp uninstall median * dapp uninstall MIP21-RWA-Example * dapp uninstall mkr-authority * dapp uninstall osm-mom * dapp uninstall univ2-lp-oracle * Replace dapp with forge * All tests are passing without dependencies * Fix test script * dapp uninstall ds-test * dapp install foundry-rs/forge-std * Set latest release of forge-std * hevm => vm * Remove unused code * Move mocks to a separate file * dapp clean => forge clean * Use vm.expectRevert() instead of testFail * Fix some tests naming (one of them wasn't running and required minor changes)
1 parent 2afff43 commit c0438a9

28 files changed

+685
-545
lines changed

.github/workflows/tests.yaml

+11-16
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,17 @@ jobs:
44
tests:
55
runs-on: ubuntu-latest
66
steps:
7-
- name: Checkout repository and submodules
8-
uses: actions/checkout@v2
9-
with:
10-
submodules: recursive
7+
- uses: actions/checkout@v3
118

12-
- name: Install nix 2.3.6
13-
uses: cachix/install-nix-action@v13
14-
with:
15-
install_url: https://releases.nixos.org/nix/nix-2.3.6/install
16-
nix_path: nixpkgs=channel:nixos-unstable
9+
- name: Install Foundry
10+
uses: foundry-rs/foundry-toolchain@v1
11+
with:
12+
version: nightly
1713

18-
- name: Use maker and dapp cachix
19-
uses: cachix/cachix-action@v10
20-
with:
21-
name: maker
22-
extraPullNames: dapp
14+
- name: Install Dependencies
15+
run: forge install
2316

24-
- name: Run tests
25-
run: nix-shell --pure --argstr url ${{ secrets.ETH_RPC_URL }} --run 'source "./allow-optimize.sh" && dapp test -v --rpc'
17+
- name: Run tests
18+
run: make test
19+
env:
20+
ETH_RPC_URL: ${{ secrets.ETH_RPC_URL }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/out
22
/hevm.libs.*
3+
/cache

.gitmodules

+3-49
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,6 @@
1-
[submodule "lib/ds-test"]
2-
path = lib/ds-test
3-
url = https://github.com/dapphub/ds-test
4-
[submodule "lib/dss"]
5-
path = lib/dss
6-
url = https://github.com/makerdao/dss
71
[submodule "lib/dss-interfaces"]
82
path = lib/dss-interfaces
93
url = https://github.com/makerdao/dss-interfaces
10-
[submodule "lib/ds-math"]
11-
path = lib/ds-math
12-
url = https://github.com/dapphub/ds-math
13-
[submodule "lib/dss-chain-log"]
14-
path = lib/dss-chain-log
15-
url = https://github.com/makerdao/dss-chain-log
16-
[submodule "lib/mkr-authority"]
17-
path = lib/mkr-authority
18-
url = https://github.com/makerdao/mkr-authority
19-
[submodule "lib/osm-mom"]
20-
path = lib/osm-mom
21-
url = https://github.com/makerdao/osm-mom
22-
[submodule "lib/ilk-registry"]
23-
path = lib/ilk-registry
24-
url = https://github.com/makerdao/ilk-registry
25-
[submodule "lib/flipper-mom"]
26-
path = lib/flipper-mom
27-
url = https://github.com/makerdao/flipper-mom
28-
[submodule "lib/median"]
29-
path = lib/median
30-
url = https://github.com/makerdao/median
31-
[submodule "lib/ds-proxy"]
32-
path = lib/ds-proxy
33-
url = https://github.com/makerdao/ds-proxy
34-
branch = solc-0.6
35-
[submodule "lib/dss-auto-line"]
36-
path = lib/dss-auto-line
37-
url = https://github.com/makerdao/dss-auto-line
38-
[submodule "lib/clipper-mom"]
39-
path = lib/clipper-mom
40-
url = https://github.com/makerdao/clipper-mom
41-
[submodule "lib/univ2-lp-oracle"]
42-
path = lib/univ2-lp-oracle
43-
url = https://github.com/makerdao/univ2-lp-oracle
44-
[submodule "lib/dss-lerp"]
45-
path = lib/dss-lerp
46-
url = https://github.com/makerdao/dss-lerp
47-
[submodule "lib/dss-direct-deposit"]
48-
path = lib/dss-direct-deposit
49-
url = https://github.com/makerdao/dss-direct-deposit
50-
[submodule "lib/MIP21-RWA-Example"]
51-
path = lib/MIP21-RWA-Example
52-
url = https://github.com/makerdao/MIP21-RWA-Example
4+
[submodule "lib/forge-std"]
5+
path = lib/forge-std
6+
url = https://github.com/foundry-rs/forge-std

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
build :; ./build.sh
2-
clean :; dapp clean
1+
build :; DAPP_BUILD_OPTIMIZE=1 DAPP_BUILD_OPTIMIZE_RUNS=200 dapp --use solc:0.6.12 build
2+
clean :; forge clean
33
test :; ./test.sh $(match)
44
deploy :; make build && dapp create DssExecLib
55
flatten :; hevm flatten --source-file "src/DssExecLib.sol" > out/DssExecLib-flat.sol

allow-optimize.sh

-38
This file was deleted.

build.sh

-7
This file was deleted.

lib/MIP21-RWA-Example

-1
This file was deleted.

lib/clipper-mom

-1
This file was deleted.

lib/ds-math

-1
This file was deleted.

lib/ds-proxy

-1
This file was deleted.

lib/ds-test

-1
This file was deleted.

lib/dss

-1
This file was deleted.

lib/dss-auto-line

-1
This file was deleted.

lib/dss-chain-log

-1
This file was deleted.

lib/dss-direct-deposit

-1
This file was deleted.

lib/dss-lerp

-1
This file was deleted.

lib/flipper-mom

-1
This file was deleted.

lib/forge-std

Submodule forge-std added at 054a250

lib/ilk-registry

-1
This file was deleted.

lib/median

-1
This file was deleted.

lib/mkr-authority

-1
This file was deleted.

lib/osm-mom

-1
This file was deleted.

lib/univ2-lp-oracle

-1
This file was deleted.

shell.nix

-21
This file was deleted.

0 commit comments

Comments
 (0)