@rev-net/core-v6 0.0.10 → 0.0.12
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/ADMINISTRATION.md +7 -7
- package/ARCHITECTURE.md +11 -11
- package/README.md +7 -4
- package/RISKS.md +2 -2
- package/SKILLS.md +8 -10
- package/STYLE_GUIDE.md +14 -1
- package/package.json +9 -9
- package/script/Deploy.s.sol +85 -35
- package/script/helpers/RevnetCoreDeploymentLib.sol +12 -5
- package/src/REVDeployer.sol +121 -129
- package/src/REVLoans.sol +14 -13
- package/src/interfaces/IREVDeployer.sol +25 -22
- package/src/structs/REVDeploy721TiersHookConfig.sol +12 -14
- package/test/REV.integrations.t.sol +17 -8
- package/test/REVAutoIssuanceFuzz.t.sol +9 -4
- package/test/REVDeployerRegressions.t.sol +13 -6
- package/test/REVInvincibility.t.sol +26 -12
- package/test/REVLifecycle.t.sol +9 -4
- package/test/REVLoans.invariants.t.sol +13 -6
- package/test/REVLoansAttacks.t.sol +12 -5
- package/test/REVLoansFeeRecovery.t.sol +12 -5
- package/test/REVLoansFindings.t.sol +16 -7
- package/test/REVLoansRegressions.t.sol +9 -4
- package/test/REVLoansSourced.t.sol +24 -11
- package/test/REVLoansUnSourced.t.sol +13 -6
- package/test/TestBurnHeldTokens.t.sol +16 -7
- package/test/TestCEIPattern.t.sol +12 -5
- package/test/TestCashOutCallerValidation.t.sol +12 -5
- package/test/TestConversionDocumentation.t.sol +25 -9
- package/test/TestCrossSourceReallocation.t.sol +12 -5
- package/test/TestEmptyBuybackSpecs.t.sol +23 -8
- package/test/TestFlashLoanSurplus.t.sol +12 -5
- package/test/TestHookArrayOOB.t.sol +19 -10
- package/test/TestLiquidationBehavior.t.sol +12 -5
- package/test/TestLowFindings.t.sol +16 -7
- package/test/TestMixedFixes.t.sol +16 -7
- package/test/TestSplitWeightAdjustment.t.sol +29 -12
- package/test/TestSplitWeightE2E.t.sol +24 -16
- package/test/TestSplitWeightFork.t.sol +20 -14
- package/test/TestStageTransitionBorrowable.t.sol +15 -5
- package/test/TestSwapTerminalPermission.t.sol +15 -5
- package/test/TestUint112Overflow.t.sol +12 -5
- package/test/TestZeroRepayment.t.sol +12 -5
- package/test/fork/ForkTestBase.sol +20 -14
- package/test/fork/TestCashOutFork.t.sol +8 -2
- package/test/fork/TestLoanCrossRulesetFork.t.sol +8 -2
- package/test/helpers/REVEmpty721Config.sol +45 -0
- package/test/regression/TestCumulativeLoanCounter.t.sol +12 -5
- package/test/regression/TestLiquidateGapHandling.t.sol +12 -5
|
@@ -7,6 +7,8 @@ import /* {*} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
|
7
7
|
import /* {*} from */ "./../src/REVDeployer.sol";
|
|
8
8
|
import "@croptop/core-v6/src/CTPublisher.sol";
|
|
9
9
|
import {MockBuybackDataHook} from "./mock/MockBuybackDataHook.sol";
|
|
10
|
+
import {REVEmpty721Config} from "./helpers/REVEmpty721Config.sol";
|
|
11
|
+
import {REVCroptopAllowedPost} from "../src/structs/REVCroptopAllowedPost.sol";
|
|
10
12
|
import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
11
13
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
14
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
@@ -58,8 +60,9 @@ contract TestZeroRepayment is TestBaseWorkflow {
|
|
|
58
60
|
FEE_PROJECT_ID = jbProjects().createFor(multisig());
|
|
59
61
|
SUCKER_REGISTRY = new JBSuckerRegistry(jbDirectory(), jbPermissions(), multisig(), address(0));
|
|
60
62
|
HOOK_STORE = new JB721TiersHookStore();
|
|
61
|
-
EXAMPLE_HOOK =
|
|
62
|
-
|
|
63
|
+
EXAMPLE_HOOK = new JB721TiersHook(
|
|
64
|
+
jbDirectory(), jbPermissions(), jbPrices(), jbRulesets(), HOOK_STORE, jbSplits(), multisig()
|
|
65
|
+
);
|
|
63
66
|
ADDRESS_REGISTRY = new JBAddressRegistry();
|
|
64
67
|
HOOK_DEPLOYER = new JB721TiersHookDeployer(EXAMPLE_HOOK, HOOK_STORE, ADDRESS_REGISTRY, multisig());
|
|
65
68
|
PUBLISHER = new CTPublisher(jbDirectory(), jbPermissions(), FEE_PROJECT_ID, multisig());
|
|
@@ -132,7 +135,9 @@ contract TestZeroRepayment is TestBaseWorkflow {
|
|
|
132
135
|
terminalConfigurations: tc,
|
|
133
136
|
suckerDeploymentConfiguration: REVSuckerDeploymentConfig({
|
|
134
137
|
deployerConfigurations: new JBSuckerDeployerConfig[](0), salt: keccak256("FEE")
|
|
135
|
-
})
|
|
138
|
+
}),
|
|
139
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
140
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
136
141
|
});
|
|
137
142
|
}
|
|
138
143
|
|
|
@@ -169,13 +174,15 @@ contract TestZeroRepayment is TestBaseWorkflow {
|
|
|
169
174
|
splitOperator: multisig(),
|
|
170
175
|
stageConfigurations: stages
|
|
171
176
|
});
|
|
172
|
-
REVNET_ID = REV_DEPLOYER.deployFor({
|
|
177
|
+
(REVNET_ID,) = REV_DEPLOYER.deployFor({
|
|
173
178
|
revnetId: 0,
|
|
174
179
|
configuration: cfg,
|
|
175
180
|
terminalConfigurations: tc,
|
|
176
181
|
suckerDeploymentConfiguration: REVSuckerDeploymentConfig({
|
|
177
182
|
deployerConfigurations: new JBSuckerDeployerConfig[](0), salt: keccak256("NANA")
|
|
178
|
-
})
|
|
183
|
+
}),
|
|
184
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
185
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
179
186
|
});
|
|
180
187
|
}
|
|
181
188
|
|
|
@@ -37,6 +37,7 @@ import {REVDeploy721TiersHookConfig} from "../../src/structs/REVDeploy721TiersHo
|
|
|
37
37
|
import {REVBaseline721HookConfig} from "../../src/structs/REVBaseline721HookConfig.sol";
|
|
38
38
|
import {REV721TiersHookFlags} from "../../src/structs/REV721TiersHookFlags.sol";
|
|
39
39
|
import {REVCroptopAllowedPost} from "../../src/structs/REVCroptopAllowedPost.sol";
|
|
40
|
+
import {REVEmpty721Config} from "../helpers/REVEmpty721Config.sol";
|
|
40
41
|
|
|
41
42
|
// Buyback hook
|
|
42
43
|
import {JBBuybackHook} from "@bananapus/buyback-hook-v6/src/JBBuybackHook.sol";
|
|
@@ -256,8 +257,9 @@ abstract contract ForkTestBase is TestBaseWorkflow {
|
|
|
256
257
|
|
|
257
258
|
SUCKER_REGISTRY = new JBSuckerRegistry(jbDirectory(), jbPermissions(), multisig(), address(0));
|
|
258
259
|
HOOK_STORE = new JB721TiersHookStore();
|
|
259
|
-
EXAMPLE_HOOK =
|
|
260
|
-
|
|
260
|
+
EXAMPLE_HOOK = new JB721TiersHook(
|
|
261
|
+
jbDirectory(), jbPermissions(), jbPrices(), jbRulesets(), HOOK_STORE, jbSplits(), multisig()
|
|
262
|
+
);
|
|
261
263
|
ADDRESS_REGISTRY = new JBAddressRegistry();
|
|
262
264
|
HOOK_DEPLOYER = new JB721TiersHookDeployer(EXAMPLE_HOOK, HOOK_STORE, ADDRESS_REGISTRY, multisig());
|
|
263
265
|
PUBLISHER = new CTPublisher(jbDirectory(), jbPermissions(), FEE_PROJECT_ID, multisig());
|
|
@@ -393,10 +395,7 @@ abstract contract ForkTestBase is TestBaseWorkflow {
|
|
|
393
395
|
tokenUriResolver: IJB721TokenUriResolver(address(0)),
|
|
394
396
|
contractUri: "ipfs://contract",
|
|
395
397
|
tiersConfig: JB721InitTiersConfig({
|
|
396
|
-
tiers: tiers,
|
|
397
|
-
currency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
398
|
-
decimals: 18,
|
|
399
|
-
prices: IJBPrices(address(0))
|
|
398
|
+
tiers: tiers, currency: uint32(uint160(JBConstants.NATIVE_TOKEN)), decimals: 18
|
|
400
399
|
}),
|
|
401
400
|
reserveBeneficiary: address(0),
|
|
402
401
|
flags: REV721TiersHookFlags({
|
|
@@ -407,10 +406,10 @@ abstract contract ForkTestBase is TestBaseWorkflow {
|
|
|
407
406
|
})
|
|
408
407
|
}),
|
|
409
408
|
salt: bytes32("FORK_721"),
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
409
|
+
preventSplitOperatorAdjustingTiers: false,
|
|
410
|
+
preventSplitOperatorUpdatingMetadata: false,
|
|
411
|
+
preventSplitOperatorMinting: false,
|
|
412
|
+
preventSplitOperatorIncreasingDiscountPercent: false
|
|
414
413
|
});
|
|
415
414
|
}
|
|
416
415
|
|
|
@@ -428,7 +427,9 @@ abstract contract ForkTestBase is TestBaseWorkflow {
|
|
|
428
427
|
revnetId: FEE_PROJECT_ID,
|
|
429
428
|
configuration: feeCfg,
|
|
430
429
|
terminalConfigurations: feeTc,
|
|
431
|
-
suckerDeploymentConfiguration: feeSdc
|
|
430
|
+
suckerDeploymentConfiguration: feeSdc,
|
|
431
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
432
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
432
433
|
});
|
|
433
434
|
}
|
|
434
435
|
|
|
@@ -437,8 +438,13 @@ abstract contract ForkTestBase is TestBaseWorkflow {
|
|
|
437
438
|
(REVConfig memory cfg, JBTerminalConfig[] memory tc, REVSuckerDeploymentConfig memory sdc) =
|
|
438
439
|
_buildMinimalConfig(cashOutTaxRate);
|
|
439
440
|
|
|
440
|
-
revnetId = REV_DEPLOYER.deployFor({
|
|
441
|
-
revnetId: 0,
|
|
441
|
+
(revnetId,) = REV_DEPLOYER.deployFor({
|
|
442
|
+
revnetId: 0,
|
|
443
|
+
configuration: cfg,
|
|
444
|
+
terminalConfigurations: tc,
|
|
445
|
+
suckerDeploymentConfiguration: sdc,
|
|
446
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
447
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
442
448
|
});
|
|
443
449
|
}
|
|
444
450
|
|
|
@@ -450,7 +456,7 @@ abstract contract ForkTestBase is TestBaseWorkflow {
|
|
|
450
456
|
cfg.description.salt = "FORK_721_SALT";
|
|
451
457
|
REVDeploy721TiersHookConfig memory hookConfig = _build721Config();
|
|
452
458
|
|
|
453
|
-
(revnetId, hook) = REV_DEPLOYER.
|
|
459
|
+
(revnetId, hook) = REV_DEPLOYER.deployFor({
|
|
454
460
|
revnetId: 0,
|
|
455
461
|
configuration: cfg,
|
|
456
462
|
terminalConfigurations: tc,
|
|
@@ -3,6 +3,7 @@ pragma solidity 0.8.26;
|
|
|
3
3
|
|
|
4
4
|
import "./ForkTestBase.sol";
|
|
5
5
|
import {JBCashOuts} from "@bananapus/core-v6/src/libraries/JBCashOuts.sol";
|
|
6
|
+
import {REVEmpty721Config} from "../helpers/REVEmpty721Config.sol";
|
|
6
7
|
|
|
7
8
|
/// @notice Fork tests for revnet cash-out scenarios with real Uniswap V4 buyback hook.
|
|
8
9
|
///
|
|
@@ -203,8 +204,13 @@ contract TestCashOutFork is ForkTestBase {
|
|
|
203
204
|
(REVConfig memory cfg, JBTerminalConfig[] memory tc, REVSuckerDeploymentConfig memory sdc) =
|
|
204
205
|
_buildMinimalConfig(5000);
|
|
205
206
|
cfg.stageConfigurations[0].startsAtOrAfter = uint40(block.timestamp - 1);
|
|
206
|
-
uint256 delayRevnet = REV_DEPLOYER.deployFor({
|
|
207
|
-
revnetId: 0,
|
|
207
|
+
(uint256 delayRevnet,) = REV_DEPLOYER.deployFor({
|
|
208
|
+
revnetId: 0,
|
|
209
|
+
configuration: cfg,
|
|
210
|
+
terminalConfigurations: tc,
|
|
211
|
+
suckerDeploymentConfiguration: sdc,
|
|
212
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
213
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
208
214
|
});
|
|
209
215
|
_setupPool(delayRevnet, 10_000 ether);
|
|
210
216
|
_payRevnet(delayRevnet, PAYER, 1 ether);
|
|
@@ -3,6 +3,7 @@ pragma solidity 0.8.26;
|
|
|
3
3
|
|
|
4
4
|
import "./ForkTestBase.sol";
|
|
5
5
|
import {JBFees} from "@bananapus/core-v6/src/libraries/JBFees.sol";
|
|
6
|
+
import {REVEmpty721Config} from "../helpers/REVEmpty721Config.sol";
|
|
6
7
|
|
|
7
8
|
/// @notice Fork tests for loan lifecycle spanning multiple revnet stages (rulesets).
|
|
8
9
|
///
|
|
@@ -85,8 +86,13 @@ contract TestLoanCrossRulesetFork is ForkTestBase {
|
|
|
85
86
|
(REVConfig memory cfg, JBTerminalConfig[] memory tc, REVSuckerDeploymentConfig memory sdc) =
|
|
86
87
|
_buildTwoStageConfig(7000, 2000);
|
|
87
88
|
|
|
88
|
-
revnetId = REV_DEPLOYER.deployFor({
|
|
89
|
-
revnetId: 0,
|
|
89
|
+
(revnetId,) = REV_DEPLOYER.deployFor({
|
|
90
|
+
revnetId: 0,
|
|
91
|
+
configuration: cfg,
|
|
92
|
+
terminalConfigurations: tc,
|
|
93
|
+
suckerDeploymentConfiguration: sdc,
|
|
94
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
95
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
90
96
|
});
|
|
91
97
|
|
|
92
98
|
// Set up pool at 1:1 (mint path wins).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {IJB721TokenUriResolver} from "@bananapus/721-hook-v6/src/interfaces/IJB721TokenUriResolver.sol";
|
|
5
|
+
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
6
|
+
import {JB721InitTiersConfig} from "@bananapus/721-hook-v6/src/structs/JB721InitTiersConfig.sol";
|
|
7
|
+
import {JB721TierConfig} from "@bananapus/721-hook-v6/src/structs/JB721TierConfig.sol";
|
|
8
|
+
import {REVBaseline721HookConfig} from "../../src/structs/REVBaseline721HookConfig.sol";
|
|
9
|
+
import {REVDeploy721TiersHookConfig} from "../../src/structs/REVDeploy721TiersHookConfig.sol";
|
|
10
|
+
import {REV721TiersHookFlags} from "../../src/structs/REV721TiersHookFlags.sol";
|
|
11
|
+
import {REVCroptopAllowedPost} from "../../src/structs/REVCroptopAllowedPost.sol";
|
|
12
|
+
|
|
13
|
+
/// @notice Helpers for constructing empty 721 hook configs in tests.
|
|
14
|
+
library REVEmpty721Config {
|
|
15
|
+
function empty721Config(uint32 baseCurrency) internal pure returns (REVDeploy721TiersHookConfig memory) {
|
|
16
|
+
return REVDeploy721TiersHookConfig({
|
|
17
|
+
baseline721HookConfiguration: REVBaseline721HookConfig({
|
|
18
|
+
name: "",
|
|
19
|
+
symbol: "",
|
|
20
|
+
baseUri: "",
|
|
21
|
+
tokenUriResolver: IJB721TokenUriResolver(address(0)),
|
|
22
|
+
contractUri: "",
|
|
23
|
+
tiersConfig: JB721InitTiersConfig({
|
|
24
|
+
tiers: new JB721TierConfig[](0), currency: baseCurrency, decimals: 18
|
|
25
|
+
}),
|
|
26
|
+
reserveBeneficiary: address(0),
|
|
27
|
+
flags: REV721TiersHookFlags({
|
|
28
|
+
noNewTiersWithReserves: false,
|
|
29
|
+
noNewTiersWithVotes: false,
|
|
30
|
+
noNewTiersWithOwnerMinting: false,
|
|
31
|
+
preventOverspending: false
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
salt: bytes32(0),
|
|
35
|
+
preventSplitOperatorAdjustingTiers: false,
|
|
36
|
+
preventSplitOperatorUpdatingMetadata: false,
|
|
37
|
+
preventSplitOperatorMinting: false,
|
|
38
|
+
preventSplitOperatorIncreasingDiscountPercent: false
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function emptyAllowedPosts() internal pure returns (REVCroptopAllowedPost[] memory) {
|
|
43
|
+
return new REVCroptopAllowedPost[](0);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -30,6 +30,8 @@ import {JB721TiersHook} from "@bananapus/721-hook-v6/src/JB721TiersHook.sol";
|
|
|
30
30
|
import {JB721TiersHookStore} from "@bananapus/721-hook-v6/src/JB721TiersHookStore.sol";
|
|
31
31
|
import {JBAddressRegistry} from "@bananapus/address-registry-v6/src/JBAddressRegistry.sol";
|
|
32
32
|
import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/IJBAddressRegistry.sol";
|
|
33
|
+
import {REVEmpty721Config} from "../helpers/REVEmpty721Config.sol";
|
|
34
|
+
import {REVCroptopAllowedPost} from "../../src/structs/REVCroptopAllowedPost.sol";
|
|
33
35
|
|
|
34
36
|
/// @notice totalLoansBorrowedFor is a cumulative counter, not an active loan count.
|
|
35
37
|
/// @dev The rename from numberOfLoansFor to totalLoansBorrowedFor clarifies that the counter only increments
|
|
@@ -62,8 +64,9 @@ contract TestCumulativeLoanCounter is TestBaseWorkflow {
|
|
|
62
64
|
FEE_PROJECT_ID = jbProjects().createFor(multisig());
|
|
63
65
|
SUCKER_REGISTRY = new JBSuckerRegistry(jbDirectory(), jbPermissions(), multisig(), address(0));
|
|
64
66
|
HOOK_STORE = new JB721TiersHookStore();
|
|
65
|
-
EXAMPLE_HOOK =
|
|
66
|
-
|
|
67
|
+
EXAMPLE_HOOK = new JB721TiersHook(
|
|
68
|
+
jbDirectory(), jbPermissions(), jbPrices(), jbRulesets(), HOOK_STORE, jbSplits(), multisig()
|
|
69
|
+
);
|
|
67
70
|
ADDRESS_REGISTRY = new JBAddressRegistry();
|
|
68
71
|
HOOK_DEPLOYER = new JB721TiersHookDeployer(EXAMPLE_HOOK, HOOK_STORE, ADDRESS_REGISTRY, multisig());
|
|
69
72
|
PUBLISHER = new CTPublisher(jbDirectory(), jbPermissions(), FEE_PROJECT_ID, multisig());
|
|
@@ -138,7 +141,9 @@ contract TestCumulativeLoanCounter is TestBaseWorkflow {
|
|
|
138
141
|
terminalConfigurations: tc,
|
|
139
142
|
suckerDeploymentConfiguration: REVSuckerDeploymentConfig({
|
|
140
143
|
deployerConfigurations: new JBSuckerDeployerConfig[](0), salt: keccak256("FEE")
|
|
141
|
-
})
|
|
144
|
+
}),
|
|
145
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
146
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
142
147
|
});
|
|
143
148
|
}
|
|
144
149
|
|
|
@@ -172,13 +177,15 @@ contract TestCumulativeLoanCounter is TestBaseWorkflow {
|
|
|
172
177
|
splitOperator: multisig(),
|
|
173
178
|
stageConfigurations: stages
|
|
174
179
|
});
|
|
175
|
-
REVNET_ID = REV_DEPLOYER.deployFor({
|
|
180
|
+
(REVNET_ID,) = REV_DEPLOYER.deployFor({
|
|
176
181
|
revnetId: 0,
|
|
177
182
|
configuration: cfg,
|
|
178
183
|
terminalConfigurations: tc,
|
|
179
184
|
suckerDeploymentConfiguration: REVSuckerDeploymentConfig({
|
|
180
185
|
deployerConfigurations: new JBSuckerDeployerConfig[](0), salt: keccak256("NANA")
|
|
181
|
-
})
|
|
186
|
+
}),
|
|
187
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
188
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
182
189
|
});
|
|
183
190
|
}
|
|
184
191
|
|
|
@@ -30,6 +30,8 @@ import {JB721TiersHook} from "@bananapus/721-hook-v6/src/JB721TiersHook.sol";
|
|
|
30
30
|
import {JB721TiersHookStore} from "@bananapus/721-hook-v6/src/JB721TiersHookStore.sol";
|
|
31
31
|
import {JBAddressRegistry} from "@bananapus/address-registry-v6/src/JBAddressRegistry.sol";
|
|
32
32
|
import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/IJBAddressRegistry.sol";
|
|
33
|
+
import {REVEmpty721Config} from "../helpers/REVEmpty721Config.sol";
|
|
34
|
+
import {REVCroptopAllowedPost} from "../../src/structs/REVCroptopAllowedPost.sol";
|
|
33
35
|
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
|
34
36
|
|
|
35
37
|
/// @notice liquidateExpiredLoansFrom halts on deleted loan gaps.
|
|
@@ -64,8 +66,9 @@ contract TestLiquidateGapHandling is TestBaseWorkflow {
|
|
|
64
66
|
FEE_PROJECT_ID = jbProjects().createFor(multisig());
|
|
65
67
|
SUCKER_REGISTRY = new JBSuckerRegistry(jbDirectory(), jbPermissions(), multisig(), address(0));
|
|
66
68
|
HOOK_STORE = new JB721TiersHookStore();
|
|
67
|
-
EXAMPLE_HOOK =
|
|
68
|
-
|
|
69
|
+
EXAMPLE_HOOK = new JB721TiersHook(
|
|
70
|
+
jbDirectory(), jbPermissions(), jbPrices(), jbRulesets(), HOOK_STORE, jbSplits(), multisig()
|
|
71
|
+
);
|
|
69
72
|
ADDRESS_REGISTRY = new JBAddressRegistry();
|
|
70
73
|
HOOK_DEPLOYER = new JB721TiersHookDeployer(EXAMPLE_HOOK, HOOK_STORE, ADDRESS_REGISTRY, multisig());
|
|
71
74
|
PUBLISHER = new CTPublisher(jbDirectory(), jbPermissions(), FEE_PROJECT_ID, multisig());
|
|
@@ -140,7 +143,9 @@ contract TestLiquidateGapHandling is TestBaseWorkflow {
|
|
|
140
143
|
terminalConfigurations: tc,
|
|
141
144
|
suckerDeploymentConfiguration: REVSuckerDeploymentConfig({
|
|
142
145
|
deployerConfigurations: new JBSuckerDeployerConfig[](0), salt: keccak256("FEE")
|
|
143
|
-
})
|
|
146
|
+
}),
|
|
147
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
148
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
144
149
|
});
|
|
145
150
|
}
|
|
146
151
|
|
|
@@ -175,13 +180,15 @@ contract TestLiquidateGapHandling is TestBaseWorkflow {
|
|
|
175
180
|
splitOperator: multisig(),
|
|
176
181
|
stageConfigurations: stages
|
|
177
182
|
});
|
|
178
|
-
REVNET_ID = REV_DEPLOYER.deployFor({
|
|
183
|
+
(REVNET_ID,) = REV_DEPLOYER.deployFor({
|
|
179
184
|
revnetId: 0,
|
|
180
185
|
configuration: cfg,
|
|
181
186
|
terminalConfigurations: tc,
|
|
182
187
|
suckerDeploymentConfiguration: REVSuckerDeploymentConfig({
|
|
183
188
|
deployerConfigurations: new JBSuckerDeployerConfig[](0), salt: keccak256("NANA")
|
|
184
|
-
})
|
|
189
|
+
}),
|
|
190
|
+
tiered721HookConfiguration: REVEmpty721Config.empty721Config(uint32(uint160(JBConstants.NATIVE_TOKEN))),
|
|
191
|
+
allowedPosts: REVEmpty721Config.emptyAllowedPosts()
|
|
185
192
|
});
|
|
186
193
|
}
|
|
187
194
|
|