@rev-net/core-v6 0.0.12 → 0.0.13
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/AUDIT_INSTRUCTIONS.md +295 -0
- package/CHANGE_LOG.md +316 -0
- package/README.md +2 -2
- package/RISKS.md +180 -35
- package/SKILLS.md +1 -1
- package/USER_JOURNEYS.md +489 -0
- package/package.json +9 -9
- package/script/Deploy.s.sol +40 -6
- package/script/helpers/RevnetCoreDeploymentLib.sol +7 -1
- package/src/REVDeployer.sol +63 -47
- package/src/REVLoans.sol +51 -15
- package/src/interfaces/IREVDeployer.sol +0 -1
- package/src/structs/REV721TiersHookFlags.sol +1 -0
- package/src/structs/REVAutoIssuance.sol +1 -0
- package/src/structs/REVBaseline721HookConfig.sol +1 -0
- package/src/structs/REVConfig.sol +1 -0
- package/src/structs/REVCroptopAllowedPost.sol +1 -0
- package/src/structs/REVDeploy721TiersHookConfig.sol +1 -0
- package/src/structs/REVDescription.sol +1 -0
- package/src/structs/REVLoan.sol +1 -0
- package/src/structs/REVLoanSource.sol +1 -0
- package/src/structs/REVStageConfig.sol +1 -0
- package/src/structs/REVSuckerDeploymentConfig.sol +1 -0
- package/test/REV.integrations.t.sol +132 -12
- package/test/REVAutoIssuanceFuzz.t.sol +23 -3
- package/test/REVDeployerRegressions.t.sol +35 -4
- package/test/REVInvincibility.t.sol +58 -8
- package/test/REVInvincibilityHandler.sol +29 -0
- package/test/REVLifecycle.t.sol +28 -3
- package/test/REVLoans.invariants.t.sol +52 -5
- package/test/REVLoansAttacks.t.sol +43 -5
- package/test/REVLoansFeeRecovery.t.sol +50 -11
- package/test/REVLoansFindings.t.sol +27 -3
- package/test/REVLoansRegressions.t.sol +25 -3
- package/test/REVLoansSourceFeeRecovery.t.sol +491 -0
- package/test/REVLoansSourced.t.sol +56 -7
- package/test/REVLoansUnSourced.t.sol +49 -5
- package/test/TestBurnHeldTokens.t.sol +32 -5
- package/test/TestCEIPattern.t.sol +26 -2
- package/test/TestCashOutCallerValidation.t.sol +30 -4
- package/test/TestConversionDocumentation.t.sol +26 -5
- package/test/TestCrossCurrencyReclaim.t.sol +584 -0
- package/test/TestCrossSourceReallocation.t.sol +26 -2
- package/test/TestERC2771MetaTx.t.sol +557 -0
- package/test/TestEmptyBuybackSpecs.t.sol +23 -3
- package/test/TestFlashLoanSurplus.t.sol +28 -3
- package/test/TestHookArrayOOB.t.sol +24 -4
- package/test/TestLiquidationBehavior.t.sol +26 -3
- package/test/TestLoanSourceRotation.t.sol +525 -0
- package/test/TestLongTailEconomics.t.sol +651 -0
- package/test/TestLowFindings.t.sol +65 -2
- package/test/TestMixedFixes.t.sol +28 -3
- package/test/TestPermit2Signatures.t.sol +657 -0
- package/test/TestReallocationSandwich.t.sol +384 -0
- package/test/TestRevnetRegressions.t.sol +324 -0
- package/test/TestSplitWeightAdjustment.t.sol +24 -2
- package/test/TestSplitWeightE2E.t.sol +29 -2
- package/test/TestSplitWeightFork.t.sol +46 -7
- package/test/TestStageTransitionBorrowable.t.sol +24 -2
- package/test/TestSwapTerminalPermission.t.sol +23 -3
- package/test/TestUint112Overflow.t.sol +28 -2
- package/test/TestZeroRepayment.t.sol +26 -2
- package/test/fork/ForkTestBase.sol +46 -3
- package/test/fork/TestCashOutFork.t.sol +1 -1
- package/test/fork/TestLoanBorrowFork.t.sol +1 -0
- package/test/fork/TestLoanCrossRulesetFork.t.sol +3 -1
- package/test/fork/TestLoanLiquidationFork.t.sol +1 -0
- package/test/fork/TestLoanReallocateFork.t.sol +1 -0
- package/test/fork/TestLoanRepayFork.t.sol +1 -0
- package/test/fork/TestLoanTransferFork.t.sol +133 -0
- package/test/fork/TestSplitWeightFork.t.sol +3 -0
- package/test/helpers/REVEmpty721Config.sol +1 -0
- package/test/mock/MockBuybackDataHook.sol +1 -0
- package/test/regression/TestBurnPermissionRequired.t.sol +267 -0
- package/test/regression/TestCrossRevnetLiquidation.t.sol +228 -0
- package/test/regression/TestCumulativeLoanCounter.t.sol +27 -4
- package/test/regression/TestLiquidateGapHandling.t.sol +29 -4
- package/test/regression/TestZeroPriceFeed.t.sol +396 -0
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
4
5
|
import "forge-std/Test.sol";
|
|
6
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
5
7
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
8
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
6
9
|
import /* {*} from */ "./../src/REVDeployer.sol";
|
|
10
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
7
11
|
import "@croptop/core-v6/src/CTPublisher.sol";
|
|
12
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
8
13
|
import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
14
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
9
15
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
16
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
10
17
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
18
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
11
19
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
20
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
12
21
|
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
13
22
|
|
|
14
23
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
@@ -16,7 +25,6 @@ import {JBMetadataResolver} from "@bananapus/core-v6/src/libraries/JBMetadataRes
|
|
|
16
25
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
26
|
import {REVLoans} from "../src/REVLoans.sol";
|
|
18
27
|
import {REVStageConfig, REVAutoIssuance} from "../src/structs/REVStageConfig.sol";
|
|
19
|
-
import {REVLoanSource} from "../src/structs/REVLoanSource.sol";
|
|
20
28
|
import {REVDescription} from "../src/structs/REVDescription.sol";
|
|
21
29
|
import {IREVLoans} from "./../src/interfaces/IREVLoans.sol";
|
|
22
30
|
import {JBSuckerDeployerConfig} from "@bananapus/suckers-v6/src/structs/JBSuckerDeployerConfig.sol";
|
|
@@ -28,7 +36,6 @@ import {JBAddressRegistry} from "@bananapus/address-registry-v6/src/JBAddressReg
|
|
|
28
36
|
import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/IJBAddressRegistry.sol";
|
|
29
37
|
import {IJBRulesetDataHook} from "@bananapus/core-v6/src/interfaces/IJBRulesetDataHook.sol";
|
|
30
38
|
import {IJBBuybackHookRegistry} from "@bananapus/buyback-hook-v6/src/interfaces/IJBBuybackHookRegistry.sol";
|
|
31
|
-
import {IJBPayHook} from "@bananapus/core-v6/src/interfaces/IJBPayHook.sol";
|
|
32
39
|
import {REVBaseline721HookConfig} from "../src/structs/REVBaseline721HookConfig.sol";
|
|
33
40
|
import {REV721TiersHookFlags} from "../src/structs/REV721TiersHookFlags.sol";
|
|
34
41
|
import {JB721TierConfig} from "@bananapus/721-hook-v6/src/structs/JB721TierConfig.sol";
|
|
@@ -41,7 +48,6 @@ import {REVEmpty721Config} from "./helpers/REVEmpty721Config.sol";
|
|
|
41
48
|
// Buyback hook
|
|
42
49
|
import {JBBuybackHook} from "@bananapus/buyback-hook-v6/src/JBBuybackHook.sol";
|
|
43
50
|
import {JBBuybackHookRegistry} from "@bananapus/buyback-hook-v6/src/JBBuybackHookRegistry.sol";
|
|
44
|
-
import {IJBBuybackHook} from "@bananapus/buyback-hook-v6/src/interfaces/IJBBuybackHook.sol";
|
|
45
51
|
import {IGeomeanOracle} from "@bananapus/buyback-hook-v6/src/interfaces/IGeomeanOracle.sol";
|
|
46
52
|
|
|
47
53
|
// Uniswap V4
|
|
@@ -49,7 +55,7 @@ import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
|
|
|
49
55
|
import {IUnlockCallback} from "@uniswap/v4-core/src/interfaces/callback/IUnlockCallback.sol";
|
|
50
56
|
import {IHooks} from "@uniswap/v4-core/src/interfaces/IHooks.sol";
|
|
51
57
|
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
|
|
52
|
-
import {
|
|
58
|
+
import {PoolIdLibrary} from "@uniswap/v4-core/src/types/PoolId.sol";
|
|
53
59
|
import {Currency, CurrencyLibrary} from "@uniswap/v4-core/src/types/Currency.sol";
|
|
54
60
|
import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
|
|
55
61
|
import {ModifyLiquidityParams, SwapParams} from "@uniswap/v4-core/src/types/PoolOperation.sol";
|
|
@@ -60,6 +66,7 @@ import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
|
|
|
60
66
|
|
|
61
67
|
/// @notice Helper that adds liquidity to and swaps on a V4 pool via the unlock/callback pattern.
|
|
62
68
|
contract LiquidityHelper is IUnlockCallback {
|
|
69
|
+
// forge-lint: disable-next-line(screaming-snake-case-immutable)
|
|
63
70
|
IPoolManager public immutable poolManager;
|
|
64
71
|
|
|
65
72
|
enum Action {
|
|
@@ -95,7 +102,8 @@ contract LiquidityHelper is IUnlockCallback {
|
|
|
95
102
|
payable
|
|
96
103
|
{
|
|
97
104
|
bytes memory data =
|
|
98
|
-
|
|
105
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
106
|
+
abi.encode(Action.ADD_LIQUIDITY, abi.encode(AddLiqParams(key, tickLower, tickUpper, liquidityDelta)));
|
|
99
107
|
poolManager.unlock(data);
|
|
100
108
|
}
|
|
101
109
|
|
|
@@ -109,7 +117,8 @@ contract LiquidityHelper is IUnlockCallback {
|
|
|
109
117
|
payable
|
|
110
118
|
{
|
|
111
119
|
bytes memory data =
|
|
112
|
-
|
|
120
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
121
|
+
abi.encode(Action.SWAP, abi.encode(DoSwapParams(key, zeroForOne, amountSpecified, sqrtPriceLimitX96)));
|
|
113
122
|
poolManager.unlock(data);
|
|
114
123
|
}
|
|
115
124
|
|
|
@@ -151,7 +160,11 @@ contract LiquidityHelper is IUnlockCallback {
|
|
|
151
160
|
DoSwapParams memory params = abi.decode(data, (DoSwapParams));
|
|
152
161
|
|
|
153
162
|
BalanceDelta delta = poolManager.swap(
|
|
154
|
-
|
|
163
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
164
|
+
params.key,
|
|
165
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
166
|
+
SwapParams(params.zeroForOne, params.amountSpecified, params.sqrtPriceLimitX96),
|
|
167
|
+
""
|
|
155
168
|
);
|
|
156
169
|
|
|
157
170
|
// Settle (pay) what we owe, take what we're owed.
|
|
@@ -171,12 +184,14 @@ contract LiquidityHelper is IUnlockCallback {
|
|
|
171
184
|
|
|
172
185
|
function _settleIfNegative(Currency currency, int128 delta) internal {
|
|
173
186
|
if (delta >= 0) return;
|
|
187
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
174
188
|
uint256 amount = uint256(uint128(-delta));
|
|
175
189
|
|
|
176
190
|
if (currency.isAddressZero()) {
|
|
177
191
|
poolManager.settle{value: amount}();
|
|
178
192
|
} else {
|
|
179
193
|
poolManager.sync(currency);
|
|
194
|
+
// forge-lint: disable-next-line(erc20-unchecked-transfer)
|
|
180
195
|
IERC20(Currency.unwrap(currency)).transfer(address(poolManager), amount);
|
|
181
196
|
poolManager.settle();
|
|
182
197
|
}
|
|
@@ -184,6 +199,7 @@ contract LiquidityHelper is IUnlockCallback {
|
|
|
184
199
|
|
|
185
200
|
function _takeIfPositive(Currency currency, int128 delta) internal {
|
|
186
201
|
if (delta <= 0) return;
|
|
202
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
187
203
|
uint256 amount = uint256(uint128(delta));
|
|
188
204
|
poolManager.take(currency, address(this), amount);
|
|
189
205
|
}
|
|
@@ -215,23 +231,36 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
215
231
|
// ───────────────────────── State
|
|
216
232
|
// ─────────────────────────
|
|
217
233
|
|
|
234
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
218
235
|
REVDeployer REV_DEPLOYER;
|
|
236
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
219
237
|
JBBuybackHook BUYBACK_HOOK;
|
|
238
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
220
239
|
JBBuybackHookRegistry BUYBACK_REGISTRY;
|
|
240
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
221
241
|
JB721TiersHook EXAMPLE_HOOK;
|
|
242
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
222
243
|
IJB721TiersHookDeployer HOOK_DEPLOYER;
|
|
244
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
223
245
|
IJB721TiersHookStore HOOK_STORE;
|
|
246
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
224
247
|
IJBAddressRegistry ADDRESS_REGISTRY;
|
|
248
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
225
249
|
IREVLoans LOANS_CONTRACT;
|
|
250
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
226
251
|
IJBSuckerRegistry SUCKER_REGISTRY;
|
|
252
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
227
253
|
CTPublisher PUBLISHER;
|
|
228
254
|
IPoolManager poolManager;
|
|
229
255
|
LiquidityHelper liqHelper;
|
|
230
256
|
|
|
257
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
231
258
|
uint256 FEE_PROJECT_ID;
|
|
232
259
|
|
|
233
260
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
261
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
234
262
|
address PAYER = makeAddr("payer");
|
|
263
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
235
264
|
address SPLIT_BENEFICIARY = makeAddr("splitBeneficiary");
|
|
236
265
|
|
|
237
266
|
// Tier configuration: 1 ETH tier with 30% split.
|
|
@@ -346,6 +375,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
346
375
|
});
|
|
347
376
|
|
|
348
377
|
cfg = REVConfig({
|
|
378
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
349
379
|
description: REVDescription("Fork Test", "FORK", "ipfs://fork", "FORK_SALT"),
|
|
350
380
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
351
381
|
splitOperator: multisig(),
|
|
@@ -375,6 +405,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
375
405
|
votingUnits: 0,
|
|
376
406
|
reserveFrequency: 0,
|
|
377
407
|
reserveBeneficiary: address(0),
|
|
408
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
378
409
|
encodedIPFSUri: bytes32("tier1"),
|
|
379
410
|
category: 1,
|
|
380
411
|
discountPercent: 0,
|
|
@@ -406,6 +437,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
406
437
|
preventOverspending: false
|
|
407
438
|
})
|
|
408
439
|
}),
|
|
440
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
409
441
|
salt: bytes32("FORK_721"),
|
|
410
442
|
preventSplitOperatorAdjustingTiers: false,
|
|
411
443
|
preventSplitOperatorUpdatingMetadata: false,
|
|
@@ -419,6 +451,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
419
451
|
// Deploy fee project first.
|
|
420
452
|
(REVConfig memory feeCfg, JBTerminalConfig[] memory feeTc, REVSuckerDeploymentConfig memory feeSdc) =
|
|
421
453
|
_buildMinimalConfig();
|
|
454
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
422
455
|
feeCfg.description = REVDescription("Fee", "FEE", "ipfs://fee", "FEE_SALT");
|
|
423
456
|
|
|
424
457
|
vm.prank(multisig());
|
|
@@ -478,6 +511,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
478
511
|
vm.stopPrank();
|
|
479
512
|
|
|
480
513
|
// Add full-range liquidity.
|
|
514
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
481
515
|
int256 liquidityDelta = int256(liquidityTokenAmount / 2);
|
|
482
516
|
vm.prank(address(liqHelper));
|
|
483
517
|
liqHelper.addLiquidity{value: liquidityTokenAmount}(key, TICK_LOWER, TICK_UPPER, liquidityDelta);
|
|
@@ -497,12 +531,14 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
497
531
|
int56[] memory tickCumulatives = new int56[](2);
|
|
498
532
|
tickCumulatives[0] = 0;
|
|
499
533
|
// arithmeticMeanTick = (tickCumulatives[1] - tickCumulatives[0]) / twapWindow = tick
|
|
534
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
500
535
|
tickCumulatives[1] = int56(tick) * int56(int32(twapWindow));
|
|
501
536
|
|
|
502
537
|
uint136[] memory secondsPerLiquidityCumulativeX128s = new uint136[](2);
|
|
503
538
|
secondsPerLiquidityCumulativeX128s[0] = 0;
|
|
504
539
|
uint256 liq = uint256(liquidity > 0 ? liquidity : -liquidity);
|
|
505
540
|
if (liq == 0) liq = 1;
|
|
541
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
506
542
|
secondsPerLiquidityCumulativeX128s[1] = uint136((uint256(twapWindow) << 128) / liq);
|
|
507
543
|
|
|
508
544
|
vm.mockCall(
|
|
@@ -598,6 +634,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
598
634
|
vm.stopPrank();
|
|
599
635
|
|
|
600
636
|
// Add full-range liquidity at tick 0 (1:1 price).
|
|
637
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
601
638
|
int256 liquidityDelta = int256(ethLiq / 4);
|
|
602
639
|
vm.prank(address(liqHelper));
|
|
603
640
|
liqHelper.addLiquidity{value: ethLiq}(key, TICK_LOWER, TICK_UPPER, liquidityDelta);
|
|
@@ -615,6 +652,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
615
652
|
uint160 sqrtPriceLimit = TickMath.getSqrtPriceAtTick(76_000);
|
|
616
653
|
|
|
617
654
|
vm.prank(address(liqHelper));
|
|
655
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
618
656
|
liqHelper.swap(key, zeroForOne, -int256(swapAmount), sqrtPriceLimit);
|
|
619
657
|
|
|
620
658
|
// Read the post-swap tick for the oracle mock.
|
|
@@ -747,6 +785,7 @@ contract TestSplitWeightFork is TestBaseWorkflow {
|
|
|
747
785
|
// Deploy a second revnet without 721 hook.
|
|
748
786
|
(REVConfig memory cfg2, JBTerminalConfig[] memory tc2, REVSuckerDeploymentConfig memory sdc2) =
|
|
749
787
|
_buildMinimalConfig();
|
|
788
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
750
789
|
cfg2.description = REVDescription("NoSplit Fork", "NSF", "ipfs://nosplit", "NSF_SALT");
|
|
751
790
|
|
|
752
791
|
(uint256 revnetId2,) = REV_DEPLOYER.deployFor({
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
4
5
|
import "forge-std/Test.sol";
|
|
6
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
5
7
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
8
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
6
9
|
import /* {*} from */ "./../src/REVDeployer.sol";
|
|
10
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
7
11
|
import "@croptop/core-v6/src/CTPublisher.sol";
|
|
8
12
|
import {MockBuybackDataHook} from "./mock/MockBuybackDataHook.sol";
|
|
13
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
9
14
|
import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
15
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
10
16
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
17
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
11
18
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
19
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
12
20
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
21
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
13
22
|
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
14
23
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
15
24
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
16
25
|
import {REVLoans} from "../src/REVLoans.sol";
|
|
17
26
|
import {REVStageConfig, REVAutoIssuance} from "../src/structs/REVStageConfig.sol";
|
|
18
|
-
import {REVLoanSource} from "../src/structs/REVLoanSource.sol";
|
|
19
27
|
import {REVDescription} from "../src/structs/REVDescription.sol";
|
|
20
28
|
import {IREVLoans} from "./../src/interfaces/IREVLoans.sol";
|
|
21
29
|
import {JBSuckerDeployerConfig} from "@bananapus/suckers-v6/src/structs/JBSuckerDeployerConfig.sol";
|
|
@@ -26,27 +34,39 @@ import {JB721TiersHookStore} from "@bananapus/721-hook-v6/src/JB721TiersHookStor
|
|
|
26
34
|
import {JBAddressRegistry} from "@bananapus/address-registry-v6/src/JBAddressRegistry.sol";
|
|
27
35
|
import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/IJBAddressRegistry.sol";
|
|
28
36
|
import {REVEmpty721Config} from "./helpers/REVEmpty721Config.sol";
|
|
29
|
-
import {REVCroptopAllowedPost} from "../src/structs/REVCroptopAllowedPost.sol";
|
|
30
37
|
|
|
31
38
|
/// @notice Documents and verifies that stage transitions change the borrowable amount for the same collateral.
|
|
32
39
|
/// This is by design: loan value tracks the current bonding curve parameters (cashOutTaxRate),
|
|
33
40
|
/// just as cash-out value does.
|
|
34
41
|
contract TestStageTransitionBorrowable is TestBaseWorkflow {
|
|
42
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
35
43
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
36
44
|
|
|
45
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
37
46
|
REVDeployer REV_DEPLOYER;
|
|
47
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
38
48
|
JB721TiersHook EXAMPLE_HOOK;
|
|
49
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
39
50
|
IJB721TiersHookDeployer HOOK_DEPLOYER;
|
|
51
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
40
52
|
IJB721TiersHookStore HOOK_STORE;
|
|
53
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
41
54
|
IJBAddressRegistry ADDRESS_REGISTRY;
|
|
55
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
56
|
IREVLoans LOANS_CONTRACT;
|
|
57
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
43
58
|
IJBSuckerRegistry SUCKER_REGISTRY;
|
|
59
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
60
|
CTPublisher PUBLISHER;
|
|
61
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
62
|
MockBuybackDataHook MOCK_BUYBACK;
|
|
46
63
|
|
|
64
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
47
65
|
uint256 FEE_PROJECT_ID;
|
|
66
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
48
67
|
uint256 REVNET_ID;
|
|
49
68
|
|
|
69
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
50
70
|
address USER = makeAddr("user");
|
|
51
71
|
|
|
52
72
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
@@ -96,6 +116,7 @@ contract TestStageTransitionBorrowable is TestBaseWorkflow {
|
|
|
96
116
|
});
|
|
97
117
|
|
|
98
118
|
cfg = REVConfig({
|
|
119
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
99
120
|
description: REVDescription("StageTest", "STG", "ipfs://test", "STG_SALT"),
|
|
100
121
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
101
122
|
splitOperator: multisig(),
|
|
@@ -155,6 +176,7 @@ contract TestStageTransitionBorrowable is TestBaseWorkflow {
|
|
|
155
176
|
|
|
156
177
|
// Deploy the test revnet.
|
|
157
178
|
(REVConfig memory cfg, JBTerminalConfig[] memory tc, REVSuckerDeploymentConfig memory sdc) = _buildConfig();
|
|
179
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
158
180
|
cfg.description = REVDescription("StageTest2", "ST2", "ipfs://test2", "STG_SALT_2");
|
|
159
181
|
(REVNET_ID,) = REV_DEPLOYER.deployFor({
|
|
160
182
|
revnetId: 0,
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
4
5
|
import "forge-std/Test.sol";
|
|
6
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
5
7
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
6
|
-
import /* {*} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
8
|
+
// import /* {*} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
9
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
7
10
|
import /* {*} from */ "./../src/REVDeployer.sol";
|
|
11
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
8
12
|
import "@croptop/core-v6/src/CTPublisher.sol";
|
|
9
13
|
import {MockBuybackDataHook} from "./mock/MockBuybackDataHook.sol";
|
|
14
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
10
15
|
import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
16
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
11
17
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
18
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
12
19
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
20
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
13
21
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
22
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
14
23
|
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
24
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
25
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
26
|
import {JBPermissionIds} from "@bananapus/permission-ids-v6/src/JBPermissionIds.sol";
|
|
18
27
|
import {REVLoans} from "../src/REVLoans.sol";
|
|
19
28
|
import {REVStageConfig, REVAutoIssuance} from "../src/structs/REVStageConfig.sol";
|
|
20
|
-
import {REVLoanSource} from "../src/structs/REVLoanSource.sol";
|
|
21
29
|
import {REVDescription} from "../src/structs/REVDescription.sol";
|
|
22
30
|
import {IREVLoans} from "./../src/interfaces/IREVLoans.sol";
|
|
23
31
|
import {JBSuckerDeployerConfig} from "@bananapus/suckers-v6/src/structs/JBSuckerDeployerConfig.sol";
|
|
@@ -28,24 +36,35 @@ import {JB721TiersHookStore} from "@bananapus/721-hook-v6/src/JB721TiersHookStor
|
|
|
28
36
|
import {JBAddressRegistry} from "@bananapus/address-registry-v6/src/JBAddressRegistry.sol";
|
|
29
37
|
import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/IJBAddressRegistry.sol";
|
|
30
38
|
import {REVEmpty721Config} from "./helpers/REVEmpty721Config.sol";
|
|
31
|
-
import {REVCroptopAllowedPost} from "../src/structs/REVCroptopAllowedPost.sol";
|
|
32
39
|
|
|
33
40
|
/// @notice Tests for default operator permissions including SET_ROUTER_TERMINAL.
|
|
34
41
|
/// Verifies that all default split operator permissions are granted correctly.
|
|
35
42
|
contract TestSwapTerminalPermission is TestBaseWorkflow {
|
|
43
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
36
44
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
37
45
|
|
|
46
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
38
47
|
REVDeployer REV_DEPLOYER;
|
|
48
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
39
49
|
JB721TiersHook EXAMPLE_HOOK;
|
|
50
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
40
51
|
IJB721TiersHookDeployer HOOK_DEPLOYER;
|
|
52
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
41
53
|
IJB721TiersHookStore HOOK_STORE;
|
|
54
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
55
|
IJBAddressRegistry ADDRESS_REGISTRY;
|
|
56
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
43
57
|
IREVLoans LOANS_CONTRACT;
|
|
58
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
59
|
IJBSuckerRegistry SUCKER_REGISTRY;
|
|
60
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
61
|
CTPublisher PUBLISHER;
|
|
62
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
63
|
MockBuybackDataHook MOCK_BUYBACK;
|
|
47
64
|
|
|
65
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
48
66
|
uint256 FEE_PROJECT_ID;
|
|
67
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
49
68
|
uint256 TEST_REVNET_ID;
|
|
50
69
|
|
|
51
70
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
@@ -144,6 +163,7 @@ contract TestSwapTerminalPermission is TestBaseWorkflow {
|
|
|
144
163
|
});
|
|
145
164
|
|
|
146
165
|
cfg = REVConfig({
|
|
166
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
147
167
|
description: REVDescription(name, ticker, "ipfs://test", salt),
|
|
148
168
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
149
169
|
splitOperator: multisig(),
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
4
5
|
import "forge-std/Test.sol";
|
|
6
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
5
7
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
6
|
-
import /* {*} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
8
|
+
// import /* {*} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
9
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
7
10
|
import /* {*} from */ "./../src/REVDeployer.sol";
|
|
11
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
8
12
|
import "@croptop/core-v6/src/CTPublisher.sol";
|
|
9
13
|
import {MockBuybackDataHook} from "./mock/MockBuybackDataHook.sol";
|
|
10
14
|
import {REVEmpty721Config} from "./helpers/REVEmpty721Config.sol";
|
|
11
|
-
import {REVCroptopAllowedPost} from "../src/structs/REVCroptopAllowedPost.sol";
|
|
12
15
|
|
|
16
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
13
17
|
import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
18
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
14
19
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
20
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
15
21
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
22
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
16
23
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
24
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
17
25
|
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
18
26
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
19
27
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -36,23 +44,38 @@ import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/
|
|
|
36
44
|
/// @title TestUint112Overflow
|
|
37
45
|
/// @notice Tests for uint112 truncation fix in REVLoans._adjust()
|
|
38
46
|
contract TestUint112Overflow is TestBaseWorkflow {
|
|
47
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
39
48
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
49
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
40
50
|
bytes32 ERC20_SALT = "REV_TOKEN";
|
|
41
51
|
|
|
52
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
53
|
REVDeployer REV_DEPLOYER;
|
|
54
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
43
55
|
JB721TiersHook EXAMPLE_HOOK;
|
|
56
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
57
|
IJB721TiersHookDeployer HOOK_DEPLOYER;
|
|
58
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
59
|
IJB721TiersHookStore HOOK_STORE;
|
|
60
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
61
|
IJBAddressRegistry ADDRESS_REGISTRY;
|
|
62
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
47
63
|
IREVLoans LOANS_CONTRACT;
|
|
64
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
48
65
|
MockERC20 TOKEN;
|
|
66
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
49
67
|
IJBSuckerRegistry SUCKER_REGISTRY;
|
|
68
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
50
69
|
CTPublisher PUBLISHER;
|
|
70
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
51
71
|
MockBuybackDataHook MOCK_BUYBACK;
|
|
52
72
|
|
|
73
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
53
74
|
uint256 FEE_PROJECT_ID;
|
|
75
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
54
76
|
uint256 REVNET_ID;
|
|
55
77
|
|
|
78
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
56
79
|
address USER = makeAddr("user");
|
|
57
80
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
58
81
|
|
|
@@ -135,6 +158,7 @@ contract TestUint112Overflow is TestBaseWorkflow {
|
|
|
135
158
|
});
|
|
136
159
|
|
|
137
160
|
REVConfig memory cfg = REVConfig({
|
|
161
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
138
162
|
description: REVDescription("Revnet", "$REV", "ipfs://test", ERC20_SALT),
|
|
139
163
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
140
164
|
splitOperator: multisig(),
|
|
@@ -184,6 +208,7 @@ contract TestUint112Overflow is TestBaseWorkflow {
|
|
|
184
208
|
ls[0] = REVLoanSource({token: JBConstants.NATIVE_TOKEN, terminal: jbMultiTerminal()});
|
|
185
209
|
|
|
186
210
|
REVConfig memory cfg = REVConfig({
|
|
211
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
187
212
|
description: REVDescription("NANA", "$NANA", "ipfs://test2", "NANA_TOKEN"),
|
|
188
213
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
189
214
|
splitOperator: multisig(),
|
|
@@ -244,6 +269,7 @@ contract TestUint112Overflow is TestBaseWorkflow {
|
|
|
244
269
|
// uint112.max is the boundary — the check is `>`, not `>=`
|
|
245
270
|
// So exactly uint112.max should NOT revert
|
|
246
271
|
uint256 maxVal = type(uint112).max;
|
|
272
|
+
// forge-lint: disable-next-line(unsafe-typecast)
|
|
247
273
|
uint112 casted = uint112(maxVal);
|
|
248
274
|
assertEq(uint256(casted), maxVal, "Casting uint112.max should not truncate");
|
|
249
275
|
}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
4
5
|
import "forge-std/Test.sol";
|
|
6
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
5
7
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
6
|
-
import /* {*} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
8
|
+
// import /* {*} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
9
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
7
10
|
import /* {*} from */ "./../src/REVDeployer.sol";
|
|
11
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
8
12
|
import "@croptop/core-v6/src/CTPublisher.sol";
|
|
9
13
|
import {MockBuybackDataHook} from "./mock/MockBuybackDataHook.sol";
|
|
10
14
|
import {REVEmpty721Config} from "./helpers/REVEmpty721Config.sol";
|
|
11
|
-
|
|
15
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
12
16
|
import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
17
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
13
18
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
19
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
14
20
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
21
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
15
22
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
23
|
+
// forge-lint: disable-next-line(unaliased-plain-import)
|
|
16
24
|
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
17
25
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
26
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -35,22 +43,36 @@ import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/
|
|
|
35
43
|
|
|
36
44
|
/// @notice Tests for PR #16: zero repayment prevention.
|
|
37
45
|
contract TestZeroRepayment is TestBaseWorkflow {
|
|
46
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
38
47
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
39
48
|
|
|
49
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
40
50
|
REVDeployer REV_DEPLOYER;
|
|
51
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
41
52
|
JB721TiersHook EXAMPLE_HOOK;
|
|
53
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
54
|
IJB721TiersHookDeployer HOOK_DEPLOYER;
|
|
55
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
43
56
|
IJB721TiersHookStore HOOK_STORE;
|
|
57
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
58
|
IJBAddressRegistry ADDRESS_REGISTRY;
|
|
59
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
60
|
IREVLoans LOANS_CONTRACT;
|
|
61
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
62
|
MockERC20 TOKEN;
|
|
63
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
47
64
|
IJBSuckerRegistry SUCKER_REGISTRY;
|
|
65
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
48
66
|
CTPublisher PUBLISHER;
|
|
67
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
49
68
|
MockBuybackDataHook MOCK_BUYBACK;
|
|
50
69
|
|
|
70
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
51
71
|
uint256 FEE_PROJECT_ID;
|
|
72
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
52
73
|
uint256 REVNET_ID;
|
|
53
74
|
|
|
75
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
54
76
|
address USER = makeAddr("user");
|
|
55
77
|
|
|
56
78
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
@@ -123,6 +145,7 @@ contract TestZeroRepayment is TestBaseWorkflow {
|
|
|
123
145
|
extraMetadata: 0
|
|
124
146
|
});
|
|
125
147
|
REVConfig memory cfg = REVConfig({
|
|
148
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
126
149
|
description: REVDescription("Revnet", "$REV", "ipfs://test", "REV_TOKEN"),
|
|
127
150
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
128
151
|
splitOperator: multisig(),
|
|
@@ -169,6 +192,7 @@ contract TestZeroRepayment is TestBaseWorkflow {
|
|
|
169
192
|
REVLoanSource[] memory ls = new REVLoanSource[](1);
|
|
170
193
|
ls[0] = REVLoanSource({token: JBConstants.NATIVE_TOKEN, terminal: jbMultiTerminal()});
|
|
171
194
|
REVConfig memory cfg = REVConfig({
|
|
195
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
172
196
|
description: REVDescription("NANA", "$NANA", "ipfs://test2", "NANA_TOKEN"),
|
|
173
197
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
174
198
|
splitOperator: multisig(),
|