@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,25 +1,32 @@
|
|
|
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";
|
|
19
27
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
20
28
|
import {MockERC20} from "@bananapus/core-v6/test/mock/MockERC20.sol";
|
|
21
29
|
import {REVLoans} from "../src/REVLoans.sol";
|
|
22
|
-
import {REVLoan} from "../src/structs/REVLoan.sol";
|
|
23
30
|
import {REVStageConfig, REVAutoIssuance} from "../src/structs/REVStageConfig.sol";
|
|
24
31
|
import {REVLoanSource} from "../src/structs/REVLoanSource.sol";
|
|
25
32
|
import {REVDescription} from "../src/structs/REVDescription.sol";
|
|
@@ -34,24 +41,40 @@ import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/
|
|
|
34
41
|
|
|
35
42
|
/// @notice Tests showing that flash loan surplus manipulation is economically unprofitable.
|
|
36
43
|
contract TestFlashLoanSurplus is TestBaseWorkflow {
|
|
44
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
37
45
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
46
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
38
47
|
bytes32 ERC20_SALT = "REV_TOKEN";
|
|
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");
|
|
77
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
55
78
|
address ATTACKER = makeAddr("attacker");
|
|
56
79
|
|
|
57
80
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
@@ -125,6 +148,7 @@ contract TestFlashLoanSurplus is TestBaseWorkflow {
|
|
|
125
148
|
extraMetadata: 0
|
|
126
149
|
});
|
|
127
150
|
REVConfig memory cfg = REVConfig({
|
|
151
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
128
152
|
description: REVDescription("Revnet", "$REV", "ipfs://test", "REV_TOKEN"),
|
|
129
153
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
130
154
|
splitOperator: multisig(),
|
|
@@ -171,6 +195,7 @@ contract TestFlashLoanSurplus is TestBaseWorkflow {
|
|
|
171
195
|
REVLoanSource[] memory ls = new REVLoanSource[](1);
|
|
172
196
|
ls[0] = REVLoanSource({token: JBConstants.NATIVE_TOKEN, terminal: jbMultiTerminal()});
|
|
173
197
|
REVConfig memory cfg = REVConfig({
|
|
198
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
174
199
|
description: REVDescription("NANA", "$NANA", "ipfs://test2", "NANA_TOKEN"),
|
|
175
200
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
176
201
|
splitOperator: multisig(),
|
|
@@ -1,22 +1,30 @@
|
|
|
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 {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";
|
|
@@ -29,9 +37,7 @@ import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/
|
|
|
29
37
|
import {JBBeforePayRecordedContext} from "@bananapus/core-v6/src/structs/JBBeforePayRecordedContext.sol";
|
|
30
38
|
import {JBPayHookSpecification} from "@bananapus/core-v6/src/structs/JBPayHookSpecification.sol";
|
|
31
39
|
import {JBTokenAmount} from "@bananapus/core-v6/src/structs/JBTokenAmount.sol";
|
|
32
|
-
import {JBRuleset} from "@bananapus/core-v6/src/structs/JBRuleset.sol";
|
|
33
40
|
import {REVEmpty721Config} from "./helpers/REVEmpty721Config.sol";
|
|
34
|
-
import {REVCroptopAllowedPost} from "../src/structs/REVCroptopAllowedPost.sol";
|
|
35
41
|
|
|
36
42
|
/// @notice Tests for PR #22: fix/c2-hook-array-oob
|
|
37
43
|
/// Verifies that the fix for the hook array out-of-bounds bug works correctly.
|
|
@@ -39,21 +45,33 @@ import {REVCroptopAllowedPost} from "../src/structs/REVCroptopAllowedPost.sol";
|
|
|
39
45
|
/// when there is no tiered 721 hook (array size is 1, not 2).
|
|
40
46
|
/// The fix: `hookSpecifications[usesTiered721Hook ? 1 : 0] = buybackHookSpecifications[0]`.
|
|
41
47
|
contract TestHookArrayOOB is TestBaseWorkflow {
|
|
48
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
49
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
43
50
|
|
|
51
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
52
|
REVDeployer REV_DEPLOYER;
|
|
53
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
54
|
JB721TiersHook EXAMPLE_HOOK;
|
|
55
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
56
|
IJB721TiersHookDeployer HOOK_DEPLOYER;
|
|
57
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
47
58
|
IJB721TiersHookStore HOOK_STORE;
|
|
59
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
48
60
|
IJBAddressRegistry ADDRESS_REGISTRY;
|
|
61
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
49
62
|
IREVLoans LOANS_CONTRACT;
|
|
63
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
50
64
|
IJBSuckerRegistry SUCKER_REGISTRY;
|
|
65
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
51
66
|
CTPublisher PUBLISHER;
|
|
67
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
52
68
|
MockBuybackDataHook MOCK_BUYBACK;
|
|
53
69
|
|
|
70
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
54
71
|
uint256 FEE_PROJECT_ID;
|
|
55
72
|
|
|
56
73
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
74
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
57
75
|
address USER = makeAddr("user");
|
|
58
76
|
|
|
59
77
|
function setUp() public override {
|
|
@@ -120,6 +138,7 @@ contract TestHookArrayOOB is TestBaseWorkflow {
|
|
|
120
138
|
});
|
|
121
139
|
|
|
122
140
|
cfg = REVConfig({
|
|
141
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
123
142
|
description: REVDescription("Test", "TST", "ipfs://test", "TEST_SALT"),
|
|
124
143
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
125
144
|
splitOperator: multisig(),
|
|
@@ -151,6 +170,7 @@ contract TestHookArrayOOB is TestBaseWorkflow {
|
|
|
151
170
|
(REVConfig memory cfg, JBTerminalConfig[] memory tc, REVSuckerDeploymentConfig memory sdc) =
|
|
152
171
|
_buildMinimalConfig();
|
|
153
172
|
// Use a different salt so the ERC20 deploy doesn't clash
|
|
173
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
154
174
|
cfg.description = REVDescription("Test2", "TS2", "ipfs://test2", "TEST_SALT_2");
|
|
155
175
|
|
|
156
176
|
(revnetId,) = REV_DEPLOYER.deployFor({
|
|
@@ -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";
|
|
@@ -24,7 +32,6 @@ import {REVLoan} from "../src/structs/REVLoan.sol";
|
|
|
24
32
|
import {REVStageConfig, REVAutoIssuance} from "../src/structs/REVStageConfig.sol";
|
|
25
33
|
import {REVLoanSource} from "../src/structs/REVLoanSource.sol";
|
|
26
34
|
import {REVDescription} from "../src/structs/REVDescription.sol";
|
|
27
|
-
import {IREVLoans} from "./../src/interfaces/IREVLoans.sol";
|
|
28
35
|
import {JBSuckerDeployerConfig} from "@bananapus/suckers-v6/src/structs/JBSuckerDeployerConfig.sol";
|
|
29
36
|
import {JBSuckerRegistry} from "@bananapus/suckers-v6/src/JBSuckerRegistry.sol";
|
|
30
37
|
import {JB721TiersHookDeployer} from "@bananapus/721-hook-v6/src/JB721TiersHookDeployer.sol";
|
|
@@ -36,22 +43,36 @@ import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
|
|
36
43
|
|
|
37
44
|
/// @notice Tests for PR #10: liquidation behavior documentation and collateral burn mechanics.
|
|
38
45
|
contract TestLiquidationBehavior is TestBaseWorkflow {
|
|
46
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
39
47
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
40
48
|
|
|
49
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
41
50
|
REVDeployer REV_DEPLOYER;
|
|
51
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
42
52
|
JB721TiersHook EXAMPLE_HOOK;
|
|
53
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
43
54
|
IJB721TiersHookDeployer HOOK_DEPLOYER;
|
|
55
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
44
56
|
IJB721TiersHookStore HOOK_STORE;
|
|
57
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
45
58
|
IJBAddressRegistry ADDRESS_REGISTRY;
|
|
59
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
46
60
|
REVLoans LOANS_CONTRACT;
|
|
61
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
47
62
|
MockERC20 TOKEN;
|
|
63
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
48
64
|
IJBSuckerRegistry SUCKER_REGISTRY;
|
|
65
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
49
66
|
CTPublisher PUBLISHER;
|
|
67
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
50
68
|
MockBuybackDataHook MOCK_BUYBACK;
|
|
51
69
|
|
|
70
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
52
71
|
uint256 FEE_PROJECT_ID;
|
|
72
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
53
73
|
uint256 REVNET_ID;
|
|
54
74
|
|
|
75
|
+
// forge-lint: disable-next-line(mixed-case-variable)
|
|
55
76
|
address USER = makeAddr("user");
|
|
56
77
|
|
|
57
78
|
address private constant TRUSTED_FORWARDER = 0xB2b5841DBeF766d4b521221732F9B618fCf34A87;
|
|
@@ -124,6 +145,7 @@ contract TestLiquidationBehavior is TestBaseWorkflow {
|
|
|
124
145
|
extraMetadata: 0
|
|
125
146
|
});
|
|
126
147
|
REVConfig memory cfg = REVConfig({
|
|
148
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
127
149
|
description: REVDescription("Revnet", "$REV", "ipfs://test", "REV_TOKEN"),
|
|
128
150
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
129
151
|
splitOperator: multisig(),
|
|
@@ -170,6 +192,7 @@ contract TestLiquidationBehavior is TestBaseWorkflow {
|
|
|
170
192
|
REVLoanSource[] memory ls = new REVLoanSource[](1);
|
|
171
193
|
ls[0] = REVLoanSource({token: JBConstants.NATIVE_TOKEN, terminal: jbMultiTerminal()});
|
|
172
194
|
REVConfig memory cfg = REVConfig({
|
|
195
|
+
// forge-lint: disable-next-line(named-struct-fields)
|
|
173
196
|
description: REVDescription("NANA", "$NANA", "ipfs://test2", "NANA_TOKEN"),
|
|
174
197
|
baseCurrency: uint32(uint160(JBConstants.NATIVE_TOKEN)),
|
|
175
198
|
splitOperator: multisig(),
|