Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.2.0 #964

Merged
merged 147 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
69291fc
chore: remove "libs" config
PaulRBerg Dec 19, 2023
5e2f91c
docs: update wording in changelog
PaulRBerg Dec 19, 2023
c1a7fe5
chore: fix SVG generation script
PaulRBerg Dec 21, 2023
4132a38
chore: update gas snapshot
andreivladbrg Dec 21, 2023
c1cca89
chore: specify number values in @custom field
andreivladbrg Dec 21, 2023
f87dc4f
build: install deps in prepack
PaulRBerg Dec 28, 2023
98d5281
Merge pull request #768 from sablier-labs/build/prepack-install-deps
PaulRBerg Dec 28, 2023
57a9174
chore: remove stale .gitattributes
PaulRBerg Dec 31, 2023
78fd5f9
chore: remove stale "lib" references
PaulRBerg Dec 31, 2023
35a1acf
ci: foundry multibuild workflow
PaulRBerg Jan 1, 2024
ff0c71b
Merge pull request #776 from sablier-labs/ci/foundry-multibuild
PaulRBerg Jan 1, 2024
38bdf71
build: switch to bun for dep management (#775)
PaulRBerg Jan 1, 2024
bf16a46
ci: define "--skip-test" input
PaulRBerg Jan 1, 2024
86a92f1
ci: bot for closing stale issues and PR
PaulRBerg Jan 3, 2024
17b284e
Merge pull request #778 from sablier-labs/ci/close-stale-issues
PaulRBerg Jan 3, 2024
a2fe652
ci: update formatting
PaulRBerg Jan 3, 2024
b66948c
ci: use v4 of actions/checkout
PaulRBerg Jan 9, 2024
f7a0c3f
chore: remove etherscan API keys (#786)
PaulRBerg Jan 10, 2024
5665d05
ci: remove submodulules in checkout
PaulRBerg Jan 10, 2024
3035b4c
chore: order vars alphabetically in .env.example
andreivladbrg Jan 11, 2024
b2282af
ci: frozen lockfile
PaulRBerg Jan 11, 2024
90009c4
ci: use reusable workflows
PaulRBerg Jan 5, 2024
b78fce1
chore: change solarray dependency (#792)
PaulRBerg Jan 12, 2024
b001643
Merge pull request #780 from sablier-labs/ci/reusable-workflows
PaulRBerg Jan 12, 2024
7819a3b
build: multi-chain deployment script (#748)
PaulRBerg Jan 16, 2024
fe8a082
docs: increase bug bounty
PaulRBerg Feb 1, 2024
84758a4
Merge pull request #809 from sablier-labs/docs/bug-bounty-increase
PaulRBerg Feb 1, 2024
698dcb3
chore: ignore node_modules in slither config
PaulRBerg Feb 2, 2024
2b65c46
ci: rename mnemonic env var
PaulRBerg Feb 2, 2024
1f09215
feat: add a util function to construct the create2 salt (#814)
andreivladbrg Feb 6, 2024
10bc0b7
ci: remove deployment workflows
andreivladbrg Feb 7, 2024
d5aea83
Merge pull request #816 from sablier-labs/ci/remove-workflows
andreivladbrg Feb 7, 2024
9ebb59a
build: set ffi true in default profile
andreivladbrg Feb 8, 2024
897bca6
ci: run fork tests only monday, wednesday and friday
andreivladbrg Feb 14, 2024
d13598e
Merge pull request #824 from sablier-labs/ci/run-fork-tests-periodically
andreivladbrg Feb 14, 2024
65d8513
feat: declare maxCount in BaseScript (#825)
andreivladbrg Feb 17, 2024
588eddd
Completely remove the flash loan logic (#779)
andreivladbrg Jan 10, 2024
2d8f1fd
Add sender hook and rename recipient's hook functions (#781)
andreivladbrg Jan 11, 2024
ca8a8e4
perf: remove unchecked in for loop
smol-ninja Jan 6, 2024
f2875bf
chore: use pragma solidity >=0.8.22
andreivladbrg Jan 11, 2024
2e1c959
refactor: consistency in calldata related struct parameters
smol-ninja Jan 6, 2024
eb411e2
refactor: make nftDescriptor public (#796)
andreivladbrg Jan 16, 2024
30e670f
chore: use pragma solidity >=0.8.22 in Core3 scripts
andreivladbrg Jan 21, 2024
7106c79
feat: `withdraw` callable by any account (#785)
smol-ninja Jan 23, 2024
fb56467
refactor: rename create functions
andreivladbrg Jan 21, 2024
b548695
refactor: rename milestone to timestamp
andreivladbrg Jan 22, 2024
da153a8
test: update Precompiles bytecode
andreivladbrg Jan 24, 2024
ee87375
Merge headers (#803)
andreivladbrg Jan 29, 2024
6b80f71
refactor: fix title in ISablierV2Comptroller
smol-ninja Feb 1, 2024
110211f
Upgrade to OpenZeppelin V5 (#806)
andreivladbrg Feb 5, 2024
37b86d8
refactor: change information when the nft is non-transferable
andreivladbrg Feb 10, 2024
9fc2747
test: pragma solidity >=0.8.22 in base script test
andreivladbrg Feb 12, 2024
e4583dc
Move all duplicated logic in the abstract contract `SablierV2Lockup` …
andreivladbrg Feb 15, 2024
90dfc22
fix: avoid duplicate calls on withdraw hook when sender is also the r…
smol-ninja Feb 20, 2024
66f5c0f
test: update Precompiles bytecode
andreivladbrg Feb 21, 2024
9194e81
fix: update the count of inherited components (#831)
smol-ninja Mar 5, 2024
5ebdb03
feat: implement SablierV2LockupTranched contract
andreivladbrg Mar 6, 2024
b835fab
ci: schedule precompile tests to mon, wed and fri
smol-ninja Mar 5, 2024
978a87c
feat: add SablierV2LockupTranched in scripts
andreivladbrg Mar 6, 2024
afb4127
feat: include lockupTranched in deployment bash script
smol-ninja Mar 6, 2024
34fee6b
Merge pull request #817 from sablier-labs/feat/lockup-tranched
andreivladbrg Mar 6, 2024
5e18148
test: emit the correct element in the assertEq events
andreivladbrg Mar 7, 2024
4b3b515
ci: add fork tests to ci with 20 runs (#838)
smol-ninja Mar 7, 2024
c39f175
Remove protocol fee (#839)
andreivladbrg Mar 11, 2024
34c7bf6
test: update precompiles bytecode
andreivladbrg Mar 11, 2024
c62bf9f
Move precompiles to precompiles directory (#841)
smol-ninja Mar 11, 2024
cbe1c0d
Remove duplicated script (#845)
andreivladbrg Mar 13, 2024
6217fcf
refactor: rename functions in Helpers (#848)
andreivladbrg Mar 14, 2024
ba4d246
docs: correct requirements in tranched createWithTimestamps
andreivladbrg Mar 14, 2024
64d9bfb
refactor: use singular form in function names
andreivladbrg Mar 14, 2024
efd4a4b
Feat/include recipient in StreamLD StreamLL StreamLT (#850)
andreivladbrg Mar 14, 2024
7b73025
docs: rename MAX_FEE to MAX_BROKER_FEE in NatSpec
smol-ninja Mar 14, 2024
ce4915f
chore: rename custom-errors to gas-custom-errors in solhint
smol-ninja Mar 16, 2024
be1dea4
feat: disallow zero startTime in dynamic and tranched (#852)
andreivladbrg Mar 17, 2024
871a75d
test: fix error in lockup linear's streamedAmountOf branching tree
smol-ninja Mar 18, 2024
0455ff5
test: MAX_BROKER_FEE (#855)
smol-ninja Mar 18, 2024
1b2ee6d
refactor: use if statement instead of ternary operator
andreivladbrg Mar 18, 2024
638b3b4
Integrate sphinx for deployment (#840)
smol-ninja Mar 20, 2024
4489cab
perf: remove unnecessary variable (#860)
smol-ninja Mar 20, 2024
6775fec
build: add base chain in foundry endpoints
andreivladbrg Mar 21, 2024
a86edee
refactor: keep streamedAmountOf only in SablierV2Lockup (#864)
andreivladbrg Mar 21, 2024
63113dc
docs: update openzeppelin version installed
andreivladbrg Mar 25, 2024
458dc34
ci: change fuzz runs to 50000 for integration test
smol-ninja Mar 25, 2024
0a75661
ci: change default runs to 50,000 in ci-deep
smol-ninja Mar 25, 2024
e080f20
Update forge-std to v1.8.1 (#865)
smol-ninja Mar 28, 2024
15b1a2a
Reorder conditions for if-else in LD to increase branch coverage (#874)
smol-ninja Apr 2, 2024
76e29fe
test: integration tests for withdraw hooks (#873)
smol-ninja Apr 2, 2024
660f06c
ci: pass CODECOV_TOKEN
PaulRBerg Apr 9, 2024
bbe1a7b
ci: pass CODECOV_TOKEN
PaulRBerg Apr 9, 2024
ca85b7e
ci: upgrade actions/upload-artifact
PaulRBerg Apr 9, 2024
e9fcd6d
Feedback from PRB on V2.2 (#883)
PaulRBerg Apr 9, 2024
c6f189c
test: order modifiers alphabetically (#885)
smol-ninja Apr 10, 2024
64accac
perf: use unchecked to calculate sender amount
smol-ninja Apr 10, 2024
e575535
Fork tests for NFTDescriptor to check compatibility with v2.0 and v2.…
smol-ninja Apr 10, 2024
84aa3cd
build: bump sphinx
smol-ninja Apr 11, 2024
45cbac2
test: inherit WithdrawHooks_Integration_Concrete_Test into Lockup con…
smol-ninja Apr 11, 2024
6f08798
Merge pull request #894 from sablier-labs/test/inherit-withdraw-hooks…
smol-ninja Apr 11, 2024
a551f41
docs: update security assumptions
smol-ninja Apr 12, 2024
a78202d
docs: fix typo
smol-ninja Apr 13, 2024
389b6a8
test: fix NFTDescriptor fork test (#899)
smol-ninja Apr 14, 2024
e3f6da6
ci: add `staging` and `staging-blast` to `ci.yml` (#901)
smol-ninja Apr 14, 2024
9657fbd
build: update bun lockfile
smol-ninja Apr 17, 2024
02a3900
build: replace ffi with stdJson for salt creation (#907)
smol-ninja Apr 23, 2024
350fcce
refactor: `Range` struct to `Timestamp` struct (#913)
smol-ninja May 3, 2024
c85c66a
style: place _update under non-constant header
andreivladbrg May 11, 2024
2e8a620
test: adds gas benchmarking tests, automates max values for segment &…
smol-ninja May 14, 2024
8d3ab20
refactor: remove sphinx (#924)
andreivladbrg May 14, 2024
db52db2
build: update evm version to Shanghai (#927)
smol-ninja May 16, 2024
48c689a
refactor: polish update-counts script
PaulRBerg May 16, 2024
2f88291
fix: replace maxSegmentCoun/maxTrancheCount with segmentCountMap/tran…
smol-ninja May 17, 2024
5616244
Merge pull request #930 from sablier-labs/prb-feedback
PaulRBerg May 17, 2024
f71eb9d
Update count script improvements (#931)
andreivladbrg May 20, 2024
2163084
test: consistent licenses in utils
PaulRBerg May 20, 2024
56ce2b9
test: absolute paths in precompiles test
PaulRBerg May 20, 2024
003dc70
revert: 56ce2b9
smol-ninja May 23, 2024
56d0ccd
test(invariant): remove TimestampStore
smol-ninja May 26, 2024
78d8c5a
Merge pull request #934 from sablier-labs/test/remove-timestampstore
PaulRBerg May 27, 2024
2a3fe70
docs: update security assumptions
PaulRBerg Jun 2, 2024
cf246ef
Merge pull request #937 from sablier-labs/docs/update-security-assump…
smol-ninja Jun 2, 2024
8a31210
feat: add required file for OP retrofunding
maxdesalle Jun 5, 2024
60a8e60
perf: emit events before hook calls (#940)
smol-ninja Jun 10, 2024
0679a79
fix: check the start time in SablierV2LockupLinear._calculateStreamed…
andreivladbrg Jun 10, 2024
8c9972f
docs: add dev natspec for statusOf function
andreivladbrg Jun 11, 2024
5d73001
build: bump deps
PaulRBerg Jun 14, 2024
6657c9d
Merge pull request #942 from sablier-labs/build/bump-deps
smol-ninja Jun 14, 2024
c223021
Build/npm ignore file (#936)
andreivladbrg Jun 14, 2024
c152133
build: bump solc to v0.8.26 (#944)
smol-ninja Jun 14, 2024
e8b9041
test(chore): correct typo
andreivladbrg Jun 17, 2024
6a3c917
refactor: disallow non alphanumeric symbols (#945)
andreivladbrg Jun 18, 2024
c5e7ca8
feat: eip-4906 interface (#946)
smol-ninja Jun 18, 2024
1ae58eb
refactor: inherit IERC-4906 in abstract (#948)
PaulRBerg Jun 18, 2024
94373ae
refactor: rename alphanumeric function (#949)
PaulRBerg Jun 19, 2024
600b1bd
docs: add ASCII art in NFT Descriptor (#950)
PaulRBerg Jun 19, 2024
abf7154
feat: hook allowlist (#951)
PaulRBerg Jun 24, 2024
3ee63db
test: benchmarks polish (#954)
PaulRBerg Jun 27, 2024
73b2d80
test: fix revert error in test_RevertWhen_LoopCalculationOverflowsBlo…
smol-ninja Jun 29, 2024
c05bfd6
test: keep gas usage below foundry 1B limit (#957)
smol-ninja Jun 29, 2024
cf2c46a
perf: return 0 in linear when startTime == blockTimestamp (#959)
andreivladbrg Jun 29, 2024
4fada2a
chore: explicitely set gas_limit in foundry config
smol-ninja Jun 29, 2024
9eaac34
implementing suggestions from Egis audit review (#960)
smol-ninja Jul 1, 2024
36b49d3
refactor: return the withdrawable amount in withdrawMax and withdrawM…
andreivladbrg Jul 1, 2024
ec60206
docs: update OZ and PRB math versions in README
andreivladbrg Jul 3, 2024
7d1b1c4
chore: remove MAX_SEGMENT_COUNT
andreivladbrg Jul 3, 2024
98121cd
docs: roll 1.2.0 (#863)
smol-ninja Jul 3, 2024
15c872a
Merged main into staging
andreivladbrg Jul 3, 2024
be21706
Merge pull request #962 from sablier-labs/staging
andreivladbrg Jul 3, 2024
7335694
docs: update release date
andreivladbrg Jul 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .env.deployment.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Used by the multi-chain deployment script

# General
export MNEMONIC="YOUR_MNEMONIC"

# RPC URLs
export ARBITRUM_RPC_URL="YOUR_RPC_URL"
export ARBITRUM_SEPOLIA_RPC_URL="YOUR_RPC_URL"
export AVALANCHE_RPC_URL="YOUR_RPC_URL"
export BASE_RPC_URL="YOUR_RPC_URL"
export BNB_RPC_URL="YOUR_RPC_URL"
export GNOSIS_RPC_URL="YOUR_RPC_URL"
export MAINNET_RPC_URL="YOUR_RPC_URL"
export OPTIMISM_RPC_URL="YOUR_RPC_URL"
export POLYGON_RPC_URL="YOUR_RPC_URL"
export SCROLL_RPC_URL="YOUR_RPC_URL"
export SEPOLIA_RPC_URL="YOUR_RPC_URL"

# Etherscan API keys
export ARBISCAN_API_KEY="YOUR_API_KEY"
export BASESCAN_API_KEY="YOUR_API_KEY"
export BSCSCAN_API_KEY="YOUR_API_KEY"
export ETHERSCAN_API_KEY="YOUR_API_KEY"
export GNOSISSCAN_API_KEY="YOUR_API_KEY"
export OPTIMISTIC_API_KEY="YOUR_API_KEY"
export POLYGONSCAN_API_KEY="YOUR_API_KEY"
export SCROLLSCAN_API_KEY="YOUR_API_KEY"
export SNOWTRACE_API_KEY="YOUR_API_KEY"

11 changes: 3 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
export API_KEY_ARBISCAN="YOUR_API_KEY_ARBISCAN"
export API_KEY_BSCSCAN="YOUR_API_KEY_BSCSCAN"
export API_KEY_ETHERSCAN="YOUR_API_KEY_ETHERSCAN"
export API_KEY_GNOSISSCAN="YOUR_API_KEY_GNOSISSCAN"
export API_KEY_INFURA="YOUR_API_KEY_INFURA"
export API_KEY_OPTIMISTIC_ETHERSCAN="YOUR_API_KEY_OPTIMISTIC_ETHERSCAN"
export API_KEY_POLYGONSCAN="YOUR_API_KEY_POLYGONSCAN"
export API_KEY_SNOWTRACE="YOUR_API_KEY_SNOWTRACE"
export RPC_URL_MAINNET="YOUR_RPC_URL_MAINNET"
export EOA="YOUR_EOA_ADDRESS"
export FOUNDRY_PROFILE="lite"
export MNEMONIC="YOUR_MNEMONIC"
export RPC_URL_MAINNET="YOUR_RPC_URL_MAINNET"

413 changes: 0 additions & 413 deletions .gas-snapshot

This file was deleted.

1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

221 changes: 31 additions & 190 deletions .github/workflows/ci-deep.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: "CI Deep"

env:
API_KEY_ETHERSCAN: ${{ secrets.API_KEY_ETHERSCAN }}
API_KEY_INFURA: ${{ secrets.API_KEY_INFURA }}
RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }}

Expand All @@ -11,11 +10,11 @@ on:
workflow_dispatch:
inputs:
unitFuzzRuns:
default: "100000"
default: "50000"
description: "Unit: number of fuzz runs."
required: false
integrationFuzzRuns:
default: "100000"
default: "50000"
description: "Integration: number of fuzz runs."
required: false
invariantRuns:
Expand All @@ -33,204 +32,46 @@ on:

jobs:
lint:
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Pnpm"
uses: "pnpm/action-setup@v2"
with:
version: "8"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "pnpm"
node-version: "lts/*"

- name: "Install the Node.js dependencies"
run: "pnpm install"

- name: "Lint the contracts"
run: "pnpm lint"

- name: "Add lint summary"
run: |
echo "## Lint result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-lint.yml@main"

build:
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Pnpm"
uses: "pnpm/action-setup@v2"
with:
version: "8"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "pnpm"
node-version: "lts/*"

- name: "Install the Node.js dependencies"
run: "pnpm install"

- name: "Show the Foundry config"
run: "forge config"

- name: "Produce an optimized build with --via-ir"
run: "FOUNDRY_PROFILE=optimized forge build"

- name: "Build the test contracts"
run: "FOUNDRY_PROFILE=test-optimized forge build"

- name: "Cache the build and the node modules so that they can be re-used by the other jobs"
uses: "actions/cache/save@v3"
with:
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized

- name: "Add build summary"
run: |
echo "## Build result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-build.yml@main"

test-unit:
env:
FOUNDRY_FUZZ_RUNS: ${{ inputs.unitFuzzRuns || '100000' }}
needs: ["lint", "build"]
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized

- name: "Run the unit tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/unit\""

- name: "Add test summary"
run: |
echo "## Unit tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: ${{ inputs.unitFuzzRuns || 50000 }}
foundry-profile: "test-optimized"
match-path: "test/unit/**/*.sol"
name: "Unit tests"

test-integration:
env:
FOUNDRY_FUZZ_RUNS: ${{ inputs.integrationFuzzRuns || '100000' }}
needs: ["lint", "build"]
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized

- name: "Run the integration tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/integration/**/*.sol\""

- name: "Add test summary"
run: |
echo "## Integration tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: ${{ inputs.integrationFuzzRuns || 50000 }}
foundry-profile: "test-optimized"
match-path: "test/integration/**/*.sol"
name: "Integration tests"

test-invariant:
env:
FOUNDRY_INVARIANT_DEPTH: ${{ inputs.invariantDepth || '100' }}
FOUNDRY_INVARIANT_RUNS: ${{ inputs.invariantRuns || '100' }}
needs: ["lint", "build"]
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized

- name: "Run the invariant tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/invariant/**/*.sol\""

- name: "Add test summary"
run: |
echo "## Invariant tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-invariant-depth: ${{ inputs.invariantDepth || 100 }}
foundry-invariant-runs: ${{ inputs.invariantRuns || 100 }}
foundry-profile: "test-optimized"
match-path: "test/invariant/**/*.sol"
name: "Invariant tests"

test-fork:
env:
FOUNDRY_FUZZ_RUNS: ${{ inputs.forkFuzzRuns || '1000' }}
needs: ["lint", "build"]
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Restore the cached build and the node modules"
uses: "actions/cache/restore@v3"
with:
fail-on-cache-miss: true
key: "build-and-modules-${{ github.sha }}"
path: |
cache
node_modules
out
out-optimized

- name: "Run the fork tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/fork/**/*.sol\""

- name: "Add test summary"
run: |
echo "## Fork tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
secrets:
RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }}
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: ${{ inputs.forkFuzzRuns || 1000 }}
foundry-profile: "test-optimized"
match-path: "test/fork/**/*.sol"
name: "Fork tests"
32 changes: 32 additions & 0 deletions .github/workflows/ci-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "CI Fork and Util tests"

on:
schedule:
- cron: "0 3 * * 1,3,5" # at 3:00 AM UTC on Monday, Wednesday and Friday

jobs:
lint:
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-lint.yml@main"

build:
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-build.yml@main"

test-fork:
needs: ["lint", "build"]
secrets:
RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }}
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-fuzz-runs: 100
foundry-profile: "test-optimized"
fuzz-seed: true
match-path: "test/fork/**/*.sol"
name: "Fork tests"

test-utils:
needs: ["lint", "build"]
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-test.yml@main"
with:
foundry-profile: "test-optimized"
match-path: "test/utils/**/*.sol"
name: "Utils tests"
Loading
Loading