@rev-net/core-v6 0.0.1 → 0.0.3
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/foundry.toml +1 -1
- package/package.json +5 -4
- package/script/Deploy.s.sol +9 -8
- package/script/helpers/RevnetCoreDeploymentLib.sol +1 -1
- package/src/REVDeployer.sol +5 -6
- package/src/REVLoans.sol +1 -1
- package/test/REV.integrations.t.sol +2 -2
- package/test/REVAutoIssuanceFuzz.t.sol +2 -2
- package/test/REVDeployerAuditRegressions.t.sol +2 -2
- package/test/REVInvincibility.t.sol +2 -2
- package/test/REVInvincibilityHandler.sol +1 -1
- package/test/REVLifecycle.t.sol +2 -2
- package/test/REVLoans.invariants.t.sol +2 -2
- package/test/REVLoansAttacks.t.sol +2 -2
- package/test/REVLoansAuditRegressions.t.sol +2 -2
- package/test/REVLoansFeeRecovery.t.sol +2 -2
- package/test/REVLoansSourced.t.sol +2 -2
- package/test/REVLoansUnSourced.t.sol +2 -2
- package/test/TestPR09_ConversionDocumentation.t.sol +2 -2
- package/test/TestPR10_LiquidationBehavior.t.sol +2 -2
- package/test/TestPR11_LowFindings.t.sol +2 -2
- package/test/TestPR12_FlashLoanSurplus.t.sol +2 -2
- package/test/TestPR13_CrossSourceReallocation.t.sol +2 -2
- package/test/TestPR15_CashOutCallerValidation.t.sol +2 -2
- package/test/TestPR16_ZeroRepayment.t.sol +2 -2
- package/test/TestPR21_Uint112Overflow.t.sol +2 -2
- package/test/TestPR22_HookArrayOOB.t.sol +2 -2
- package/test/TestPR26_BurnHeldTokens.t.sol +2 -2
- package/test/TestPR27_CEIPattern.t.sol +2 -2
- package/test/TestPR29_SwapTerminalPermission.t.sol +12 -14
- package/test/TestPR32_MixedFixes.t.sol +2 -2
- package/test/helpers/MaliciousContracts.sol +1 -1
- package/test/mock/MockBuybackDataHook.sol +1 -1
package/foundry.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rev-net/core-v6",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/rev-net/revnet-core-v6"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
+
"postinstall": "find node_modules -name '*.sol' -type f | xargs grep -l 'pragma solidity 0.8.23;' 2>/dev/null | xargs sed -i '' 's/pragma solidity 0.8.23;/pragma solidity 0.8.26;/g' 2>/dev/null || true",
|
|
10
11
|
"test": "forge test",
|
|
11
12
|
"coverage:integration": "forge coverage --match-path \"./src/*.sol\" --report lcov --report summary",
|
|
12
13
|
"deploy:mainnets": "source ./.env && export START_TIME=$(date +%s) && npx sphinx propose ./script/Deploy.s.sol --networks mainnets",
|
|
@@ -18,10 +19,10 @@
|
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"@bananapus/721-hook-v6": "^0.0.2",
|
|
20
21
|
"@bananapus/buyback-hook-v6": "^0.0.1",
|
|
21
|
-
"@bananapus/core-v6": "^0.0.
|
|
22
|
-
"@bananapus/permission-ids-v6": "^0.0.
|
|
22
|
+
"@bananapus/core-v6": "^0.0.4",
|
|
23
|
+
"@bananapus/permission-ids-v6": "^0.0.2",
|
|
23
24
|
"@bananapus/suckers-v6": "^0.0.1",
|
|
24
|
-
"@bananapus/
|
|
25
|
+
"@bananapus/router-terminal-v6": "^0.0.2",
|
|
25
26
|
"@croptop/core-v6": "^0.0.3",
|
|
26
27
|
"@openzeppelin/contracts": "^5.2.0"
|
|
27
28
|
},
|
package/script/Deploy.s.sol
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
5
5
|
import "@bananapus/buyback-hook-v6/script/helpers/BuybackDeploymentLib.sol";
|
|
6
6
|
import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
7
7
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
8
|
-
import "@bananapus/
|
|
8
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
9
9
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
10
10
|
|
|
11
11
|
import {Sphinx} from "@sphinx-labs/contracts/SphinxPlugin.sol";
|
|
@@ -48,8 +48,8 @@ contract DeployScript is Script, Sphinx {
|
|
|
48
48
|
Hook721Deployment hook;
|
|
49
49
|
/// @notice tracks the deployment of the sucker contracts for the chain we are deploying to.
|
|
50
50
|
SuckerDeployment suckers;
|
|
51
|
-
/// @notice tracks the deployment of the
|
|
52
|
-
|
|
51
|
+
/// @notice tracks the deployment of the router terminal.
|
|
52
|
+
RouterTerminalDeployment routerTerminal;
|
|
53
53
|
|
|
54
54
|
uint32 PREMINT_CHAIN_ID = 1;
|
|
55
55
|
string NAME = "Revnet";
|
|
@@ -103,10 +103,11 @@ contract DeployScript is Script, Sphinx {
|
|
|
103
103
|
hook = Hook721DeploymentLib.getDeployment(
|
|
104
104
|
vm.envOr("NANA_721_DEPLOYMENT_PATH", string("node_modules/@bananapus/721-hook-v6/deployments/"))
|
|
105
105
|
);
|
|
106
|
-
// Get the deployment addresses for the
|
|
107
|
-
|
|
106
|
+
// Get the deployment addresses for the router terminal contracts for this chain.
|
|
107
|
+
routerTerminal = RouterTerminalDeploymentLib.getDeployment(
|
|
108
108
|
vm.envOr(
|
|
109
|
-
"
|
|
109
|
+
"NANA_ROUTER_TERMINAL_DEPLOYMENT_PATH",
|
|
110
|
+
string("node_modules/@bananapus/router-terminal-v6/deployments/")
|
|
110
111
|
)
|
|
111
112
|
);
|
|
112
113
|
// Get the deployment addresses for the 721 hook contracts for this chain.
|
|
@@ -137,7 +138,7 @@ contract DeployScript is Script, Sphinx {
|
|
|
137
138
|
terminalConfigurations[0] =
|
|
138
139
|
JBTerminalConfig({terminal: core.terminal, accountingContextsToAccept: accountingContextsToAccept});
|
|
139
140
|
terminalConfigurations[1] = JBTerminalConfig({
|
|
140
|
-
terminal: IJBTerminal(address(
|
|
141
|
+
terminal: IJBTerminal(address(routerTerminal.registry)),
|
|
141
142
|
accountingContextsToAccept: new JBAccountingContext[](0)
|
|
142
143
|
});
|
|
143
144
|
|
package/src/REVDeployer.sol
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
5
|
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
|
@@ -528,20 +528,19 @@ contract REVDeployer is ERC2771Context, IREVDeployer, IJBRulesetDataHook, IJBCas
|
|
|
528
528
|
uint256[] memory customSplitOperatorPermissionIndexes = _extraOperatorPermissions[revnetId];
|
|
529
529
|
|
|
530
530
|
// Make the array that merges the default and custom operator permissions.
|
|
531
|
-
allOperatorPermissions = new uint256[](
|
|
531
|
+
allOperatorPermissions = new uint256[](8 + customSplitOperatorPermissionIndexes.length);
|
|
532
532
|
allOperatorPermissions[0] = JBPermissionIds.SET_SPLIT_GROUPS;
|
|
533
533
|
allOperatorPermissions[1] = JBPermissionIds.SET_BUYBACK_POOL;
|
|
534
534
|
allOperatorPermissions[2] = JBPermissionIds.SET_BUYBACK_TWAP;
|
|
535
535
|
allOperatorPermissions[3] = JBPermissionIds.SET_PROJECT_URI;
|
|
536
536
|
allOperatorPermissions[4] = JBPermissionIds.ADD_PRICE_FEED;
|
|
537
537
|
allOperatorPermissions[5] = JBPermissionIds.SUCKER_SAFETY;
|
|
538
|
-
allOperatorPermissions[6] = JBPermissionIds.
|
|
539
|
-
allOperatorPermissions[7] = JBPermissionIds.
|
|
540
|
-
allOperatorPermissions[8] = JBPermissionIds.SET_SWAP_TERMINAL;
|
|
538
|
+
allOperatorPermissions[6] = JBPermissionIds.SET_BUYBACK_HOOK;
|
|
539
|
+
allOperatorPermissions[7] = JBPermissionIds.SET_ROUTER_TERMINAL;
|
|
541
540
|
|
|
542
541
|
// Copy the custom permissions into the array.
|
|
543
542
|
for (uint256 i; i < customSplitOperatorPermissionIndexes.length; i++) {
|
|
544
|
-
allOperatorPermissions[
|
|
543
|
+
allOperatorPermissions[8 + i] = customSplitOperatorPermissionIndexes[i];
|
|
545
544
|
}
|
|
546
545
|
}
|
|
547
546
|
|
package/src/REVLoans.sol
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import {StdInvariant} from "forge-std/StdInvariant.sol";
|
|
@@ -14,7 +14,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
14
14
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
15
15
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
16
16
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
17
|
-
import "@bananapus/
|
|
17
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
18
18
|
|
|
19
19
|
import {JBCashOuts} from "@bananapus/core-v6/src/libraries/JBCashOuts.sol";
|
|
20
20
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
package/test/REVLifecycle.t.sol
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import {StdInvariant} from "forge-std/StdInvariant.sol";
|
|
@@ -14,7 +14,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
14
14
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
15
15
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
16
16
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
17
|
-
import "@bananapus/
|
|
17
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
18
18
|
|
|
19
19
|
import {JBCashOuts} from "@bananapus/core-v6/src/libraries/JBCashOuts.sol";
|
|
20
20
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBFees} from "@bananapus/core-v6/src/libraries/JBFees.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
|
|
17
17
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
18
18
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
17
17
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
18
18
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -11,7 +11,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
11
11
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
12
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
13
13
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
14
|
-
import "@bananapus/
|
|
14
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
15
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
16
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
17
|
import {JBSingleAllowance} from "@bananapus/core-v6/src/structs/JBSingleAllowance.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
17
17
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
18
18
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -11,7 +11,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
11
11
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
12
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
13
13
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
14
|
-
import "@bananapus/
|
|
14
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
15
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
16
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
17
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -11,7 +11,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
11
11
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
12
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
13
13
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
14
|
-
import "@bananapus/
|
|
14
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
15
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
16
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
17
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
17
17
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
18
18
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -11,7 +11,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
11
11
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
12
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
13
13
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
14
|
-
import "@bananapus/
|
|
14
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
15
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
16
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
17
|
import {JBSingleAllowance} from "@bananapus/core-v6/src/structs/JBSingleAllowance.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
17
17
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
18
18
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -11,7 +11,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
11
11
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
12
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
13
13
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
14
|
-
import "@bananapus/
|
|
14
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
15
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
16
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
17
|
import {REVLoans} from "../src/REVLoans.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
17
17
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
18
18
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -12,7 +12,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
12
12
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
13
13
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
14
14
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
15
|
-
import "@bananapus/
|
|
15
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
16
16
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
17
17
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
18
18
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -11,7 +11,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
11
11
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
12
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
13
13
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
14
|
-
import "@bananapus/
|
|
14
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
15
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
16
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
17
|
import {JBPermissionIds} from "@bananapus/permission-ids-v6/src/JBPermissionIds.sol";
|
|
@@ -28,9 +28,8 @@ import {JB721TiersHookStore} from "@bananapus/721-hook-v6/src/JB721TiersHookStor
|
|
|
28
28
|
import {JBAddressRegistry} from "@bananapus/address-registry-v6/src/JBAddressRegistry.sol";
|
|
29
29
|
import {IJBAddressRegistry} from "@bananapus/address-registry-v6/src/interfaces/IJBAddressRegistry.sol";
|
|
30
30
|
|
|
31
|
-
/// @notice Tests for
|
|
32
|
-
/// Verifies that
|
|
33
|
-
/// split operator permissions. The fix adds this as the 7th default permission.
|
|
31
|
+
/// @notice Tests for default operator permissions including SET_ROUTER_TERMINAL.
|
|
32
|
+
/// Verifies that all default split operator permissions are granted correctly.
|
|
34
33
|
contract TestPR29_SwapTerminalPermission is TestBaseWorkflow, JBTest {
|
|
35
34
|
bytes32 REV_DEPLOYER_SALT = "REVDeployer";
|
|
36
35
|
|
|
@@ -145,7 +144,7 @@ contract TestPR29_SwapTerminalPermission is TestBaseWorkflow, JBTest {
|
|
|
145
144
|
});
|
|
146
145
|
}
|
|
147
146
|
|
|
148
|
-
/// @notice Verify the split operator has SET_BUYBACK_HOOK and
|
|
147
|
+
/// @notice Verify the split operator has SET_BUYBACK_HOOK and SET_ROUTER_TERMINAL permissions.
|
|
149
148
|
function test_splitOperator_hasRegistryPermissions() public view {
|
|
150
149
|
bool hasBuybackHook = jbPermissions()
|
|
151
150
|
.hasPermission({
|
|
@@ -158,31 +157,30 @@ contract TestPR29_SwapTerminalPermission is TestBaseWorkflow, JBTest {
|
|
|
158
157
|
});
|
|
159
158
|
assertTrue(hasBuybackHook, "Split operator should have SET_BUYBACK_HOOK permission");
|
|
160
159
|
|
|
161
|
-
bool
|
|
160
|
+
bool hasRouterTerminal = jbPermissions()
|
|
162
161
|
.hasPermission({
|
|
163
162
|
operator: multisig(),
|
|
164
163
|
account: address(REV_DEPLOYER),
|
|
165
164
|
projectId: TEST_REVNET_ID,
|
|
166
|
-
permissionId: JBPermissionIds.
|
|
165
|
+
permissionId: JBPermissionIds.SET_ROUTER_TERMINAL,
|
|
167
166
|
includeRoot: false,
|
|
168
167
|
includeWildcardProjectId: false
|
|
169
168
|
});
|
|
170
|
-
assertTrue(
|
|
169
|
+
assertTrue(hasRouterTerminal, "Split operator should have SET_ROUTER_TERMINAL permission");
|
|
171
170
|
}
|
|
172
171
|
|
|
173
|
-
/// @notice Verify all
|
|
172
|
+
/// @notice Verify all 8 default permissions are present for the split operator.
|
|
174
173
|
function test_allDefaultPermissionsPresent() public view {
|
|
175
|
-
// All
|
|
176
|
-
uint256[
|
|
174
|
+
// All 8 default permissions that should be granted
|
|
175
|
+
uint256[8] memory expectedPermissions = [
|
|
177
176
|
uint256(JBPermissionIds.SET_SPLIT_GROUPS),
|
|
178
177
|
uint256(JBPermissionIds.SET_BUYBACK_POOL),
|
|
179
178
|
uint256(JBPermissionIds.SET_BUYBACK_TWAP),
|
|
180
179
|
uint256(JBPermissionIds.SET_PROJECT_URI),
|
|
181
180
|
uint256(JBPermissionIds.ADD_PRICE_FEED),
|
|
182
181
|
uint256(JBPermissionIds.SUCKER_SAFETY),
|
|
183
|
-
uint256(JBPermissionIds.ADD_SWAP_TERMINAL_POOL),
|
|
184
182
|
uint256(JBPermissionIds.SET_BUYBACK_HOOK),
|
|
185
|
-
uint256(JBPermissionIds.
|
|
183
|
+
uint256(JBPermissionIds.SET_ROUTER_TERMINAL)
|
|
186
184
|
];
|
|
187
185
|
|
|
188
186
|
for (uint256 i = 0; i < expectedPermissions.length; i++) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity 0.8.
|
|
2
|
+
pragma solidity 0.8.26;
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import /* {*} from */ "@bananapus/core-v6/test/helpers/TestBaseWorkflow.sol";
|
|
@@ -11,7 +11,7 @@ import "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
|
|
|
11
11
|
import "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
|
|
12
12
|
import "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
|
|
13
13
|
import "@croptop/core-v6/script/helpers/CroptopDeploymentLib.sol";
|
|
14
|
-
import "@bananapus/
|
|
14
|
+
import "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
|
|
15
15
|
import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
|
|
16
16
|
import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
|
|
17
17
|
import {MockPriceFeed} from "@bananapus/core-v6/test/mock/MockPriceFeed.sol";
|