Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Commit be08b11

Browse files
committed
chore: merge history from flow repository
This merge incorporates the full commit history from the flow repository while preserving all commit metadata (authors, timestamps). All files have been moved to the flow/ subdirectory. Source: https://github.com/sablier-labs/flow.git # Conflicts: # flow/bun.lock # flow/foundry.toml # flow/justfile # flow/package.json # flow/tests/fork/Flow.t.sol # flow/tests/fork/Fork.t.sol
2 parents 80f7bdd + df782d7 commit be08b11

24 files changed

Lines changed: 1088 additions & 0 deletions

flow/.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# All files
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = space
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
[*.sol]
16+
indent_size = 4
17+
18+
[*.tree]
19+
indent_size = 1

flow/.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ETH_FROM="YOUR_EOA_ADDRESS"
2+
FOUNDRY_PROFILE="lite"
3+
MNEMONIC="YOUR_MNEMONIC"
4+
MAINNET_RPC_URL="YOUR_MAINNET_RPC_URL"

flow/.github/workflows/ci-deep.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: "CI Deep"
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * 3,6" # at 3:00am UTC on Wednesday and Saturday
6+
workflow_dispatch:
7+
inputs:
8+
integrationFuzzRuns:
9+
default: "100000"
10+
description: "Integration: number of fuzz runs."
11+
required: false
12+
invariantRuns:
13+
default: "20000"
14+
description: "Invariant runs: number of sequences of function calls generated and run."
15+
required: false
16+
invariantDepth:
17+
default: "200"
18+
description: "Invariant depth: number of function calls made in a given run."
19+
required: false
20+
forkFuzzRuns:
21+
default: "20"
22+
description: "Fork: number of fuzz runs."
23+
required: false
24+
25+
jobs:
26+
check:
27+
uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main"
28+
29+
build:
30+
uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main"
31+
32+
test-integration:
33+
needs: ["check", "build"]
34+
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
35+
with:
36+
foundry-fuzz-runs: ${{ fromJSON(inputs.integrationFuzzRuns || '100000') }}
37+
foundry-profile: "test-optimized"
38+
match-path: "tests/integration/**/*.sol"
39+
name: "Integration tests"
40+
41+
test-invariant:
42+
needs: ["check", "build"]
43+
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
44+
with:
45+
foundry-invariant-depth: ${{ fromJSON(inputs.invariantDepth || '200') }}
46+
foundry-invariant-runs: ${{ fromJSON(inputs.invariantRuns || '20000') }}
47+
foundry-profile: "test-optimized"
48+
match-path: "tests/invariant/**/*.sol"
49+
name: "Invariant tests"
50+
51+
test-fork:
52+
needs: ["check", "build"]
53+
secrets:
54+
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
55+
ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }}
56+
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
57+
with:
58+
foundry-fuzz-runs: ${{ fromJSON(inputs.forkFuzzRuns || '20') }}
59+
foundry-profile: "test-optimized"
60+
match-path: "tests/fork/**/*.sol"
61+
name: "Fork tests"
62+
retry-attempts: 2
63+
64+
notify-on-failure:
65+
if: failure()
66+
needs: ["check", "build", "test-integration", "test-invariant", "test-fork"]
67+
runs-on: "ubuntu-latest"
68+
steps:
69+
- name: "Send Slack notification"
70+
uses: "rtCamp/action-slack-notify@v2"
71+
env:
72+
SLACK_CHANNEL: "#ci-notifications"
73+
SLACK_MESSAGE: "CI Workflow failed for ${{ github.repository }} on branch ${{ github.ref }} at job ${{ github.job }}."
74+
SLACK_USERNAME: "GitHub CI"
75+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}

flow/.github/workflows/ci-fork.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CI Fork tests"
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * 2,4" # at 3:00 AM UTC on Tuesday and Thursday
6+
workflow_dispatch:
7+
8+
jobs:
9+
check:
10+
uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main"
11+
12+
build:
13+
uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main"
14+
15+
test-fork:
16+
needs: ["check", "build"]
17+
secrets:
18+
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
19+
ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }}
20+
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
21+
with:
22+
foundry-fuzz-runs: 100
23+
foundry-profile: "test-optimized"
24+
fuzz-seed: true
25+
match-path: "tests/fork/**/*.sol"
26+
name: "Fork tests"
27+
retry-attempts: 2
28+
29+
notify-on-failure:
30+
if: failure()
31+
needs: ["check", "build", "test-fork"]
32+
runs-on: "ubuntu-latest"
33+
steps:
34+
- name: "Send Slack notification"
35+
uses: "rtCamp/action-slack-notify@v2"
36+
env:
37+
SLACK_CHANNEL: "#ci-notifications"
38+
SLACK_MESSAGE: "CI Workflow failed for ${{ github.repository }} on branch ${{ github.ref }} at job ${{ github.job }}."
39+
SLACK_USERNAME: "GitHub CI"
40+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Multibuild"
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 3 * * 0" # at 3:00am UTC every Sunday
7+
8+
jobs:
9+
multibuild:
10+
runs-on: "ubuntu-latest"
11+
steps:
12+
- name: "Check out the repo"
13+
uses: "actions/checkout@v5"
14+
15+
- name: "Install Bun"
16+
uses: "oven-sh/setup-bun@v2"
17+
with:
18+
bun-version: "latest"
19+
20+
- name: "Install the Node.js dependencies"
21+
run: "bun install --frozen-lockfile"
22+
23+
- name: "Check that the project can be built with multiple Solidity versions"
24+
uses: "PaulRBerg/foundry-multibuild@v1"
25+
with:
26+
min: "0.8.22"
27+
max: "0.8.29"
28+
skip-test: "true"

flow/.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: "CI"
2+
3+
concurrency:
4+
cancel-in-progress: true
5+
group: ${{github.workflow}}-${{github.ref}}
6+
7+
on:
8+
workflow_dispatch:
9+
pull_request:
10+
push:
11+
branches:
12+
- "main"
13+
- "staging"
14+
15+
jobs:
16+
check:
17+
uses: "sablier-labs/gha-utils/.github/workflows/full-check.yml@main"
18+
19+
build:
20+
uses: "sablier-labs/gha-utils/.github/workflows/forge-build.yml@main"
21+
22+
test-bulloak:
23+
needs: ["check", "build"]
24+
if: needs.build.outputs.cache-status != 'primary'
25+
uses: "sablier-labs/gha-utils/.github/workflows/bulloak-check.yml@main"
26+
with:
27+
skip-modifiers: true
28+
test-dir: "tests/integration"
29+
30+
test-integration:
31+
needs: ["check", "build"]
32+
if: needs.build.outputs.cache-status != 'primary'
33+
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
34+
with:
35+
foundry-fuzz-runs: 10000
36+
foundry-profile: "test-optimized"
37+
match-path: "tests/integration/**/*.sol"
38+
name: "Integration tests"
39+
40+
test-invariant:
41+
needs: ["check", "build"]
42+
if: needs.build.outputs.cache-status != 'primary'
43+
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
44+
with:
45+
foundry-invariant-depth: 100
46+
foundry-invariant-runs: 1000
47+
foundry-profile: "test-optimized"
48+
match-path: "tests/invariant/**/*.sol"
49+
name: "Invariant tests"
50+
51+
test-fork:
52+
needs: ["check", "build"]
53+
if: needs.build.outputs.cache-status != 'primary'
54+
secrets:
55+
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
56+
ROUTEMESH_API_KEY: ${{ secrets.ROUTEMESH_API_KEY }}
57+
uses: "sablier-labs/gha-utils/.github/workflows/forge-test.yml@main"
58+
with:
59+
foundry-fuzz-runs: 20
60+
foundry-profile: "test-optimized"
61+
match-path: "tests/fork/**/*.sol"
62+
name: "Fork tests"
63+
64+
coverage:
65+
needs: ["check", "build"]
66+
if: needs.build.outputs.cache-status != 'primary'
67+
secrets:
68+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
69+
uses: "sablier-labs/gha-utils/.github/workflows/forge-coverage.yml@main"
70+
with:
71+
match-path: "tests/{integration}/**/*.sol"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Cron: Close Stale Issues and PRs"
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 3 * * 0" # at 3:00am UTC every Sunday
7+
8+
jobs:
9+
stale:
10+
uses: "sablier-labs/gha-utils/.github/workflows/cron-stale.yml@main"

flow/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# directories
2+
artifacts
3+
artifacts-*
4+
broadcast
5+
cache
6+
cache_hardhat-zk
7+
coverage
8+
deployments
9+
deployments-*
10+
docs
11+
node_modules
12+
out
13+
out-*
14+
repomix
15+
typechain-types
16+
17+
# files
18+
*.env
19+
*.log
20+
.DS_Store
21+
.pnp.*
22+
bun.lockb
23+
deployments.md
24+
lcov.info
25+
package-lock.json
26+
pnpm-lock.yaml
27+
yarn.lock

flow/.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
bun lint-staged

flow/.lintstagedrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* @type {import("lint-staged").Configuration}
3+
*/
4+
module.exports = {
5+
"*.{json,md,yml}": "bun prettier --cache --write",
6+
"*.sol": ["bun solhint --cache --fix --noPrompt", "forge fmt"],
7+
};

0 commit comments

Comments
 (0)