Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -25,15 +23,14 @@ jobs:

- name: Check generated files
run: |
cd service_contracts
make clean-gen
make gen
if [ -n "$(git status --porcelain)" ]; then
echo "Error: Generated files are not up to date!"
echo "Uncommitted changes detected:"
git status --porcelain
echo ""
echo "Please run 'make gen' in service_contracts/ and commit the changes."
echo "Please run 'make gen' and commit the changes."
exit 1
fi
echo "Generated files are up to date ✓"
Expand All @@ -44,8 +41,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -54,11 +49,10 @@ jobs:

- name: Check for ABI changes
run: |
cd service_contracts
if [ ! -d "abi" ]; then
echo "Error: No ABI directory found!"
echo "ABIs must be checked into the repository to track interface changes."
echo "Please run 'make update-abi' in service_contracts/ and commit the ABIs."
echo "Please run 'make update-abi' and commit the ABIs."
exit 1
fi
make update-abi
Expand All @@ -70,7 +64,7 @@ jobs:
echo "Diff:"
git diff abi/
echo ""
echo "Please run 'make update-abi' in service_contracts/ and commit the changes."
echo "Please run 'make update-abi' and commit the changes."
exit 1
fi
echo "All ABIs are up to date ✓"
21 changes: 7 additions & 14 deletions .github/workflows/contract-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,38 @@ jobs:
version: v1.3.5

- name: Install Dependencies
run: |
cd service_contracts
forge install
run: make install

- name: Install jq
run: sudo apt-get install -y jq

- name: Check contract size
run: |
cd service_contracts
make contract-size-check
run: make contract-size-check

- name: Build current commit sizes
run: |
cd service_contracts
forge build --sizes --json > current_sizes.json
run: forge build --sizes --json > current_sizes.json

- name: Build base branch sizes (PR only)
if: github.event_name == 'pull_request'
run: |
git fetch origin main
mkdir base_build
git worktree add base_build origin/main
cd base_build/service_contracts
cd base_build
if forge build --offline --sizes --json > ../base_sizes.json 2>/dev/null; then
echo "Offline build succeeded"
else
echo "Offline build failed, installing dependencies"
forge install
make install
forge build --sizes --json > ../base_sizes.json
fi
cd ../..
cd ..
git worktree remove --force base_build

- name: Compare contract sizes
run: |
cd service_contracts
if [ -f base_sizes.json ]; then
./tools/compare_contract_sizes.sh current_sizes.json base_sizes.json
./packages/warm-storage/tools/compare_contract_sizes.sh current_sizes.json base_sizes.json
else
echo "No base size data found - skipping delta comparison."
fi
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -21,7 +19,6 @@ jobs:

- name: Run Lint
run: |
cd service_contracts
forge fmt --check
forge build
! (forge lint 2>&1 | grep "")
17 changes: 17 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Please

on:
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

2 changes: 0 additions & 2 deletions .github/workflows/subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,28 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.3.5

- name: Install Dependencies
run: |
cd service_contracts
make install
run: make install

- name: Run build
run: |
export PATH="/home/runner/.config/.foundry/bin:$PATH"
cd service_contracts
make build

- name: Run tests
run: |
export PATH="/home/runner/.config/.foundry/bin:$PATH"
cd service_contracts
make test

- name: Generate coverage report
run: |
export PATH="/home/runner/.config/.foundry/bin:$PATH"
cd service_contracts
echo "::warning::Coverage is currently disabled due to Solidity stack depth limitations"
echo "The combination of complex nested mappings, Payments contract interactions, and coverage"
echo "instrumentation exceeds Solidity's stack depth limits even with --ir-minimum flag."
Expand All @@ -52,6 +45,6 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./service_contracts
directory: ./
files: ./lcov.info
fail_ci_if_error: false
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# VIM
*.swp
# Compiler files
cache/
out/

# Ignores development broadcast logs
broadcast/

# Node modules
node_modules/

# Foundry dependencies
/lib

# Ignore IDEs
.idea

# Ignore VIM
*.swp
21 changes: 3 additions & 18 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
[submodule "service_contracts/lib/forge-std"]
path = service_contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "service_contracts/lib/openzeppelin-contracts"]
path = service_contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "service_contracts/lib/openzeppelin-contracts-upgradeable"]
path = service_contracts/lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
[submodule "service_contracts/lib/fws-payments"]
path = service_contracts/lib/fws-payments
url = https://github.com/FilOzone/fws-payments
[submodule "service_contracts/lib/pdp"]
path = service_contracts/lib/pdp
url = https://github.com/FilOzone/pdp
[submodule "service_contracts/lib/session-key-registry"]
path = service_contracts/lib/session-key-registry
url = https://github.com/FilOzone/SessionKeyRegistry
[submodule "lib/fvm-solidity"]
path = lib/fvm-solidity
url = https://github.com/filecoin-project/fvm-solidity
Loading