@bananapus/core-v6 0.0.25 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bananapus/core-v6",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,8 @@
26
26
  "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'nana-core-v6'"
27
27
  },
28
28
  "dependencies": {
29
- "@bananapus/permission-ids-v6": "^0.0.11",
29
+ "@bananapus/address-registry-v6": "^0.0.15",
30
+ "@bananapus/permission-ids-v6": "^0.0.14",
30
31
  "@chainlink/contracts": "^1.3.0",
31
32
  "@openzeppelin/contracts": "^5.6.1",
32
33
  "@prb/math": "^4.1.1",
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.28;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  import {TestBaseWorkflow} from "./helpers/TestBaseWorkflow.sol";
5
5
  import {IJBController} from "../src/interfaces/IJBController.sol";
@@ -114,6 +114,7 @@ contract FeeFreeSurplusLifecycleTest is TestBaseWorkflow {
114
114
  splits[0] = JBSplit({
115
115
  preferAddToBalance: true,
116
116
  percent: JBConstants.SPLITS_TOTAL_PERCENT,
117
+ // forge-lint: disable-next-line(unsafe-typecast)
117
118
  projectId: uint64(_recipientProjectId),
118
119
  beneficiary: payable(address(0)),
119
120
  lockedUntil: 0,
@@ -126,8 +127,11 @@ contract FeeFreeSurplusLifecycleTest is TestBaseWorkflow {
126
127
 
127
128
  // Payout limit: allow paying out the full PAY_AMOUNT each cycle.
128
129
  JBCurrencyAmount[] memory payoutLimits = new JBCurrencyAmount[](1);
129
- payoutLimits[0] =
130
- JBCurrencyAmount({amount: uint224(PAY_AMOUNT), currency: uint32(uint160(JBConstants.NATIVE_TOKEN))});
130
+ payoutLimits[0] = JBCurrencyAmount({
131
+ // forge-lint: disable-next-line(unsafe-typecast)
132
+ amount: uint224(PAY_AMOUNT),
133
+ currency: uint32(uint160(JBConstants.NATIVE_TOKEN))
134
+ });
131
135
 
132
136
  // Fund access limits with the payout limit defined above.
133
137
  JBFundAccessLimitGroup[] memory payerLimits = new JBFundAccessLimitGroup[](1);
@@ -16,7 +16,6 @@ import {JBRulesetMetadata} from "../../src/structs/JBRulesetMetadata.sol";
16
16
  import {JBSplit} from "../../src/structs/JBSplit.sol";
17
17
  import {JBSplitGroup} from "../../src/structs/JBSplitGroup.sol";
18
18
  import {JBTerminalConfig} from "../../src/structs/JBTerminalConfig.sol";
19
- import {mulDiv} from "@prb/math/src/Common.sol";
20
19
 
21
20
  contract FeeFreeSurplusStaleTest is TestBaseWorkflow {
22
21
  IJBController private _controller;
@@ -63,8 +62,11 @@ contract FeeFreeSurplusStaleTest is TestBaseWorkflow {
63
62
  });
64
63
 
65
64
  JBCurrencyAmount[] memory surplusAllowances = new JBCurrencyAmount[](1);
66
- surplusAllowances[0] =
67
- JBCurrencyAmount({amount: uint224(PAY_AMOUNT), currency: uint32(uint160(JBConstants.NATIVE_TOKEN))});
65
+ surplusAllowances[0] = JBCurrencyAmount({
66
+ // forge-lint: disable-next-line(unsafe-typecast)
67
+ amount: uint224(PAY_AMOUNT),
68
+ currency: uint32(uint160(JBConstants.NATIVE_TOKEN))
69
+ });
68
70
 
69
71
  JBFundAccessLimitGroup[] memory fundAccessLimitGroups = new JBFundAccessLimitGroup[](1);
70
72
  fundAccessLimitGroups[0] = JBFundAccessLimitGroup({
@@ -91,6 +93,7 @@ contract FeeFreeSurplusStaleTest is TestBaseWorkflow {
91
93
  splits[0] = JBSplit({
92
94
  preferAddToBalance: true,
93
95
  percent: JBConstants.SPLITS_TOTAL_PERCENT,
96
+ // forge-lint: disable-next-line(unsafe-typecast)
94
97
  projectId: uint64(_projectIdB),
95
98
  beneficiary: payable(address(0)),
96
99
  lockedUntil: 0,
@@ -101,8 +104,11 @@ contract FeeFreeSurplusStaleTest is TestBaseWorkflow {
101
104
  splitGroups[0] = JBSplitGroup({groupId: uint32(uint160(JBConstants.NATIVE_TOKEN)), splits: splits});
102
105
 
103
106
  JBCurrencyAmount[] memory payoutLimits = new JBCurrencyAmount[](1);
104
- payoutLimits[0] =
105
- JBCurrencyAmount({amount: uint224(PAY_AMOUNT), currency: uint32(uint160(JBConstants.NATIVE_TOKEN))});
107
+ payoutLimits[0] = JBCurrencyAmount({
108
+ // forge-lint: disable-next-line(unsafe-typecast)
109
+ amount: uint224(PAY_AMOUNT),
110
+ currency: uint32(uint160(JBConstants.NATIVE_TOKEN))
111
+ });
106
112
 
107
113
  JBFundAccessLimitGroup[] memory projectALimits = new JBFundAccessLimitGroup[](1);
108
114
  projectALimits[0] = JBFundAccessLimitGroup({
@@ -150,6 +150,7 @@ contract USDTVoidReturnCompat is TestBaseWorkflow {
150
150
 
151
151
  // Grant Permit2 allowance for the terminal to pull tokens.
152
152
  vm.prank(payer);
153
+ // forge-lint: disable-next-line(unsafe-typecast)
153
154
  permit2().approve(address(usdt), address(jbMultiTerminal()), uint160(payAmount), type(uint48).max);
154
155
 
155
156
  // Execute the payment — this is the critical call that must handle void returns.
@@ -196,6 +197,7 @@ contract USDTVoidReturnCompat is TestBaseWorkflow {
196
197
 
197
198
  // Grant Permit2 allowance for the terminal.
198
199
  vm.prank(payer);
200
+ // forge-lint: disable-next-line(unsafe-typecast)
199
201
  permit2().approve(address(usdt), address(jbMultiTerminal()), uint160(payAmount), type(uint48).max);
200
202
 
201
203
  // Pay into the project to fund it.
@@ -254,6 +256,7 @@ contract USDTVoidReturnCompat is TestBaseWorkflow {
254
256
 
255
257
  // Grant Permit2 allowance for the terminal.
256
258
  vm.prank(payer);
259
+ // forge-lint: disable-next-line(unsafe-typecast)
257
260
  permit2().approve(address(usdt), address(jbMultiTerminal()), uint160(payAmount), type(uint48).max);
258
261
 
259
262
  // Pay into the project to receive project tokens.
@@ -316,6 +319,7 @@ contract USDTVoidReturnCompat is TestBaseWorkflow {
316
319
 
317
320
  // Grant Permit2 allowance for the terminal.
318
321
  vm.prank(payer);
322
+ // forge-lint: disable-next-line(unsafe-typecast)
319
323
  permit2().approve(address(usdt), address(jbMultiTerminal()), uint160(payAmount), type(uint48).max);
320
324
 
321
325
  // Step 1: Pay into the project.
@@ -367,6 +371,7 @@ contract USDTVoidReturnCompat is TestBaseWorkflow {
367
371
  // =========================================================================
368
372
 
369
373
  /// @notice Launches a project that accepts MockUSDT with no splits and no payout limits.
374
+ // forge-lint: disable-next-line(mixed-case-function)
370
375
  function _launchUSDTProject() internal returns (uint256) {
371
376
  // Create a single-element array for the ruleset configuration.
372
377
  JBRulesetConfig[] memory rulesetConfig = new JBRulesetConfig[](1);
@@ -428,6 +433,7 @@ contract USDTVoidReturnCompat is TestBaseWorkflow {
428
433
  }
429
434
 
430
435
  /// @notice Launches a project that accepts MockUSDT with a 100% split to splitBeneficiary.
436
+ // forge-lint: disable-next-line(mixed-case-function)
431
437
  function _launchUSDTProjectWithSplit() internal returns (uint256) {
432
438
  // Create a single-element array for the ruleset configuration.
433
439
  JBRulesetConfig[] memory rulesetConfig = new JBRulesetConfig[](1);
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity ^0.8.28;
2
+ pragma solidity 0.8.28;
3
3
 
4
4
  import {TestTerminalPreviewParity_Local} from "../TestTerminalPreviewParity.sol";
5
5
  import {IJBTerminal} from "../../src/interfaces/IJBTerminal.sol";