Skip to content
Open
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
191 changes: 0 additions & 191 deletions .gas-snapshots.json

This file was deleted.

14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -68,7 +70,7 @@ jobs:
- name: Build contracts (forge build)
run: forge build
- name: Run Foundry tests (forge test)
run: forge test --no-match-path test/invariant --no-match-path test/fuzz
run: forge test --no-match-path "test/{invariant,fuzz}/**"
- name: Run Hardhat tests
run: npx hardhat test

Expand All @@ -79,6 +81,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -97,7 +101,7 @@ jobs:
with:
version: latest
- name: Run Foundry fuzz tests
run: forge test --match-path test/fuzz
run: forge test --match-path "fuzz"

invariant-tests:
name: Invariant Tests
Expand All @@ -106,6 +110,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -124,7 +130,7 @@ jobs:
with:
version: latest
- name: Run Foundry invariant tests
run: forge test --match-path test/invariant
run: forge test --match-path "Invariant"

gas-check:
name: Gas Check
Expand All @@ -133,6 +139,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/fuzz-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

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

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -40,7 +42,7 @@ jobs:
forge test --match-contract StakingFuzzTest --fuzz-runs 1000 -vv

- name: Generate coverage report
run: forge coverage --report lcov
run: forge coverage --ir-minimum --report lcov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand All @@ -54,6 +56,8 @@ jobs:

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

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -66,7 +70,7 @@ jobs:
- name: Run property-based tests
run: |
echo "Running property-based tests with model checker..."
forge test --match-contract WeightedStakingFuzzTest --no-match-test testFuzz_ -vv
forge test --match-contract WeightedStakingFuzzTest -vv

- name: Run invariant tests
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/gas-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ jobs:

- name: Compare gas snapshots
run: |
if git diff --quiet .gas-snapshots.json; then
if [ ! -f .gas-snapshots.json ]; then
echo "No gas snapshot file found. Skipping."
elif git diff --quiet .gas-snapshots.json; then
echo "✓ No gas regression detected"
else
echo "⚠ Gas changes detected:"
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ node_modules
# Gas reporter files
.gas-reports.json

# Foundry files
/out
/foundry.lock
lcov.info

# Hide CI workflow and automation scripts from contributors
.github/workflows/ci.yml
create_issues_contract.sh
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
Loading
Loading