Skip to content

Commit b88ef1e

Browse files
Merge pull request #76 from FilOzone/feat/fix-foundry-structure
Fix Foundry project structure
2 parents 6bdfb63 + 4d830ae commit b88ef1e

39 files changed

+67
-176
lines changed

.github/workflows/makefile.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,26 @@ name: Makefile CI
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ["main"]
88

99
jobs:
1010
build:
11-
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v4
16-
17-
- name: configure
18-
run: ./configure
14+
- uses: actions/checkout@v4
1915

20-
- name: Run build
21-
run: |
22-
export PATH="/home/runner/.config/.foundry/bin:$PATH";
23-
make build;
16+
- name: configure
17+
run: ./configure
2418

19+
- name: Run build
20+
run: |
21+
export PATH="/home/runner/.config/.foundry/bin:$PATH";
22+
make build;
2523
26-
- name: Run tests
27-
run: |
28-
export PATH="/home/runner/.config/.foundry/bin:$PATH";
29-
make test;
24+
- name: Run tests
25+
run: |
26+
export PATH="/home/runner/.config/.foundry/bin:$PATH";
27+
make test;

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
# Visual Studio Code local configuration
1+
# IDE
22
.vscode
3+
4+
# Foundry
5+
cache/
6+
out/
7+
8+
# System files
9+
.DS_Store
10+
11+
# Configuration backups
12+
configure.backup

.gitmodules

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[submodule "contracts/lib/forge-std"]
2-
path = contracts/lib/forge-std
1+
[submodule "lib/forge-std"]
2+
path = lib/forge-std
33
url = https://github.com/foundry-rs/forge-std
4-
[submodule "contracts/lib/openzeppelin-contracts"]
5-
path = contracts/lib/openzeppelin-contracts
4+
[submodule "lib/openzeppelin-contracts"]
5+
path = lib/openzeppelin-contracts
66
url = https://github.com/OpenZeppelin/openzeppelin-contracts
7-
[submodule "contracts/lib/openzeppelin-contracts-upgradeable"]
8-
path = contracts/lib/openzeppelin-contracts-upgradeable
7+
[submodule "lib/openzeppelin-contracts-upgradeable"]
8+
path = lib/openzeppelin-contracts-upgradeable
99
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable

Makefile

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
# Makefile for PDP Contracts
22

33
# Variables
4-
RPC_URL ?=
5-
KEYSTORE_PATH ?=
6-
PASSWORD ?=
7-
CHALLENGE_FINALITY ?=
4+
RPC_URL ?=
5+
KEYSTORE_PATH ?=
6+
PASSWORD ?=
7+
CHALLENGE_FINALITY ?=
88

9-
# Targets
9+
# Default target
10+
.PHONY: all
11+
all: build test
12+
13+
# Build target
14+
.PHONY: build
1015
build:
11-
cd contracts && forge build
16+
forge build
1217

18+
# Test target
19+
.PHONY: test
1320
test:
14-
cd contracts && forge test -vv
21+
forge test -vv
1522

23+
# Deployment targets
24+
.PHONY: deploy-calibnet
1625
deploy-calibnet:
17-
cd contracts && ../tools/deploy-calibnet.sh
26+
./tools/deploy-calibnet.sh
1827

28+
.PHONY: deploy-devnet
1929
deploy-devnet:
20-
cd contracts && ../tools/deploy-devnet.sh
21-
22-
testBurnFee:
23-
cd tools && ./testBurnFee.sh
30+
./tools/deploy-devnet.sh

contracts/.github/workflows/test.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

contracts/.gitignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

contracts/README.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

contracts/foundry.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

contracts/lib/forge-std

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)