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

Commit d5e230e

Browse files
committed
build: use bun catalogs
ci: disable airdrop tests fix: fix forge-std remapping issue with "postinstall" hook test: Unit_Test in airdrop tests test: invariant config for Lockup tests text: fix invariant deal in Lockup tests
1 parent b5fe031 commit d5e230e

12 files changed

Lines changed: 97 additions & 71 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ jobs:
4141
# ---------------------------------------------------------------------------- #
4242
# Unit #
4343
# ---------------------------------------------------------------------------- #
44-
- workspace: airdrops
45-
test-type: unit
44+
# - workspace: airdrops
45+
# test-type: unit
4646
- workspace: lockup
4747
test-type: unit
4848
# ---------------------------------------------------------------------------- #
4949
# INTEGRATION #
5050
# ---------------------------------------------------------------------------- #
51-
- workspace: airdrops
52-
test-type: integration
51+
# - workspace: airdrops
52+
# test-type: integration
5353
- workspace: flow
5454
test-type: integration
5555
- workspace: lockup

airdrops/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"url": "https://github.com/sablier-labs/airdrops/issues"
1212
},
1313
"dependencies": {
14-
"@openzeppelin/contracts": "5.3.0",
15-
"@prb/math": "4.1.0",
16-
"@sablier/evm-utils": "1.0.0-beta.2",
17-
"@sablier/lockup": "workspace:*"
14+
"@openzeppelin/contracts": "catalog:",
15+
"@prb/math": "catalog:",
16+
"@sablier/evm-utils": "catalog:",
17+
"@sablier/lockup": "3.0.0-beta.0"
1818
},
1919
"devDependencies": {
20-
"forge-std": "github:foundry-rs/forge-std#v1.10.0",
20+
"forge-std": "catalog:testing",
2121
"murky": "github:dmfxyz/murky#6f67641",
22-
"solady": "0.0.208"
22+
"solady": "catalog:testing"
2323
},
2424
"files": [
2525
"artifacts",
@@ -62,7 +62,6 @@
6262
},
6363
"repository": "sablier-labs/airdrops",
6464
"scripts": {
65-
"prepack": "bun install --frozen-lockfile && bash ./scripts/bash/prepare-artifacts.sh",
66-
"setup": "husky"
65+
"prepack": "bun install --frozen-lockfile && bash ./scripts/bash/prepare-artifacts.sh"
6766
}
6867
}

airdrops/tests/unit/Unit.t.sol

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: UNLICENSED
2+
pragma solidity >=0.8.22 <0.9.0;
3+
4+
import { Base_Test } from "../Base.t.sol";
5+
6+
abstract contract Unit_Test is Base_Test {
7+
function setUp() public virtual override {
8+
Base_Test.setUp();
9+
}
10+
}

airdrops/tests/unit/SignatureHash.t.sol renamed to airdrops/tests/unit/signature-hash/SignatureHash.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ pragma solidity >=0.8.22 <0.9.0;
33

44
import { SignatureHash } from "src/libraries/SignatureHash.sol";
55

6-
import { Base_Test } from "../Base.t.sol";
6+
import { Unit_Test } from "../Unit.t.sol";
77

8-
contract SignatureHash_Integration_Test is Base_Test {
8+
contract SignatureHash_Integration_Test is Unit_Test {
99
function test_Constants() external pure {
1010
assertEq(SignatureHash.PROTOCOL_NAME, keccak256("Sablier Airdrops Protocol"));
1111
assertEq(

bun.lock

Lines changed: 37 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flow/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"url": "https://github.com/sablier-labs/flow/issues"
1212
},
1313
"dependencies": {
14-
"@openzeppelin/contracts": "5.3.0",
15-
"@prb/math": "4.1.0",
16-
"@sablier/evm-utils": "1.0.0-beta.2"
14+
"@openzeppelin/contracts": "catalog:",
15+
"@prb/math": "catalog:",
16+
"@sablier/evm-utils": "catalog:"
1717
},
1818
"devDependencies": {
19-
"forge-std": "github:foundry-rs/forge-std#v1.10.0"
19+
"forge-std": "catalog:testing"
2020
},
2121
"files": [
2222
"artifacts",
@@ -56,7 +56,6 @@
5656
"url": "git+https://github.com/sablier-labs/flow.git"
5757
},
5858
"scripts": {
59-
"prepack": "bun install --frozen-lockfile && bash ./scripts/bash/prepare-artifacts.sh",
60-
"setup": "husky"
59+
"prepack": "bun install --frozen-lockfile && bash ./scripts/bash/prepare-artifacts.sh"
6160
}
6261
}

lockup/foundry.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
[profile.default.fuzz]
1313
runs = 50
1414

15+
[profile.default.invariant]
16+
depth = 20
17+
runs = 20
18+
1519
[profile.lite]
1620
extends = "../foundry.toml"
1721

@@ -21,6 +25,3 @@
2125

2226
[profile.test-optimized]
2327
extends = "../foundry.toml"
24-
25-
[lint]
26-
lint_on_build = false

lockup/funding.json

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

lockup/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
"url": "https://github.com/sablier-labs/lockup/issues"
1212
},
1313
"dependencies": {
14-
"@openzeppelin/contracts": "5.3.0",
15-
"@prb/math": "4.1.0",
16-
"@sablier/evm-utils": "1.0.0-beta.2"
14+
"@openzeppelin/contracts": "catalog:",
15+
"@prb/math": "catalog:",
16+
"@sablier/evm-utils": "catalog:"
1717
},
1818
"devDependencies": {
19-
"forge-std": "github:foundry-rs/forge-std#v1.10.0",
20-
"solady": "0.0.208",
19+
"forge-std": "catalog:testing",
20+
"solady": "catalog:testing",
2121
"solarray": "github:evmcheb/solarray#a547630"
2222
},
2323
"files": [
@@ -61,7 +61,6 @@
6161
"url": "git+https://github.com/sablier-labs/lockup.git"
6262
},
6363
"scripts": {
64-
"prepack": "bun install --frozen-lockfile && bash ./scripts/bash/prepare-artifacts.sh",
65-
"setup": "husky"
64+
"prepack": "bun install --frozen-lockfile && bash ./scripts/bash/prepare-artifacts.sh"
6665
}
6766
}

lockup/tests/invariant/handlers/LockupCreateHandler.sol

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ contract LockupCreateHandler is BaseHandler, Calculations {
5858
params.depositAmount = fuzzDynamicStreamAmounts({ upperBound: 1_000_000_000e18, segments: segments });
5959

6060
// Mint enough tokens to the Sender.
61-
deal({ token: address(token), to: params.sender, give: token.balanceOf(params.sender) + params.depositAmount });
61+
deal({ token: address(token), to: params.sender, give: params.depositAmount });
6262

6363
// Approve {SablierLockup} to spend the tokens.
6464
token.approve({ spender: address(lockup), value: params.depositAmount });
@@ -96,7 +96,7 @@ contract LockupCreateHandler is BaseHandler, Calculations {
9696
(params, unlockAmounts, durations) = _boundCreateWithDurationsLLParams(params, unlockAmounts, durations);
9797

9898
// Mint enough tokens to the Sender.
99-
deal({ token: address(token), to: params.sender, give: token.balanceOf(params.sender) + params.depositAmount });
99+
deal({ token: address(token), to: params.sender, give: params.depositAmount });
100100

101101
// Approve {SablierLockup} to spend the tokens.
102102
token.approve({ spender: address(lockup), value: params.depositAmount });
@@ -140,7 +140,7 @@ contract LockupCreateHandler is BaseHandler, Calculations {
140140
params.depositAmount = fuzzTranchedStreamAmounts({ upperBound: 1_000_000_000e18, tranches: tranches });
141141

142142
// Mint enough tokens to the Sender.
143-
deal({ token: address(token), to: params.sender, give: token.balanceOf(params.sender) + params.depositAmount });
143+
deal({ token: address(token), to: params.sender, give: params.depositAmount });
144144

145145
// Approve {SablierLockup} to spend the tokens.
146146
token.approve({ spender: address(lockup), value: params.depositAmount });
@@ -186,7 +186,7 @@ contract LockupCreateHandler is BaseHandler, Calculations {
186186
params.depositAmount = fuzzDynamicStreamAmounts({ upperBound: 1_000_000_000e18, segments: segments });
187187

188188
// Mint enough tokens to the Sender.
189-
deal({ token: address(token), to: params.sender, give: token.balanceOf(params.sender) + params.depositAmount });
189+
deal({ token: address(token), to: params.sender, give: params.depositAmount });
190190

191191
// Approve {SablierLockup} to spend the tokens.
192192
token.approve({ spender: address(lockup), value: params.depositAmount });
@@ -225,7 +225,7 @@ contract LockupCreateHandler is BaseHandler, Calculations {
225225
(params, unlockAmounts, cliffTime) = _boundCreateWithTimestampsLLParams(params, unlockAmounts, cliffTime);
226226

227227
// Mint enough tokens to the Sender.
228-
deal({ token: address(token), to: params.sender, give: token.balanceOf(params.sender) + params.depositAmount });
228+
deal({ token: address(token), to: params.sender, give: params.depositAmount });
229229

230230
// Approve {SablierLockup} to spend the tokens.
231231
token.approve({ spender: address(lockup), value: params.depositAmount });
@@ -271,7 +271,7 @@ contract LockupCreateHandler is BaseHandler, Calculations {
271271
params.depositAmount = fuzzTranchedStreamAmounts({ upperBound: 1_000_000_000e18, tranches: tranches });
272272

273273
// Mint enough tokens to the Sender.
274-
deal({ token: address(token), to: params.sender, give: token.balanceOf(params.sender) + params.depositAmount });
274+
deal({ token: address(token), to: params.sender, give: params.depositAmount });
275275

276276
// Approve {SablierLockup} to spend the tokens.
277277
token.approve({ spender: address(lockup), value: params.depositAmount });

0 commit comments

Comments
 (0)