@bananapus/core-v6 0.0.8 → 0.0.10
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 +0 -1
- package/package.json +2 -2
- package/script/DeployPeriphery.s.sol +11 -0
- package/src/JBChainlinkV3PriceFeed.sol +1 -5
- package/src/JBChainlinkV3SequencerPriceFeed.sol +1 -1
- package/src/JBController.sol +277 -277
- package/src/JBDeadline.sol +1 -1
- package/src/JBDirectory.sol +93 -93
- package/src/JBERC20.sol +43 -39
- package/src/JBFeelessAddresses.sol +12 -12
- package/src/JBFundAccessLimits.sol +82 -82
- package/src/JBMultiTerminal.sol +313 -313
- package/src/JBPermissions.sol +104 -100
- package/src/JBPrices.sol +68 -68
- package/src/JBProjects.sol +31 -31
- package/src/JBRulesets.sol +422 -422
- package/src/JBSplits.sol +116 -116
- package/src/JBTerminalStore.sol +651 -651
- package/src/JBTokens.sol +41 -41
- package/src/interfaces/IJBCashOutTerminal.sol +25 -7
- package/src/interfaces/IJBController.sol +78 -3
- package/src/interfaces/IJBDirectory.sol +25 -0
- package/src/interfaces/IJBFeeTerminal.sol +31 -0
- package/src/interfaces/IJBFeelessAddresses.sol +4 -0
- package/src/interfaces/IJBFundAccessLimits.sol +5 -0
- package/src/interfaces/IJBMigratable.sol +12 -8
- package/src/interfaces/IJBPayoutTerminal.sol +56 -9
- package/src/interfaces/IJBPermissions.sol +14 -7
- package/src/interfaces/IJBPermitTerminal.sol +4 -0
- package/src/interfaces/IJBPrices.sol +6 -0
- package/src/interfaces/IJBProjects.sol +8 -0
- package/src/interfaces/IJBRulesetApprovalHook.sol +1 -1
- package/src/interfaces/IJBRulesetDataHook.sol +23 -23
- package/src/interfaces/IJBRulesets.sol +54 -33
- package/src/interfaces/IJBSplits.sol +6 -0
- package/src/interfaces/IJBTerminal.sol +36 -0
- package/src/interfaces/IJBTerminalStore.sol +63 -63
- package/src/interfaces/IJBToken.sol +5 -5
- package/src/interfaces/IJBTokens.sol +50 -8
- package/test/TestDurationUnderflow.sol +3 -2
package/foundry.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bananapus/core-v6",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'nana-core-v6'"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@bananapus/permission-ids-v6": "^0.0.
|
|
29
|
+
"@bananapus/permission-ids-v6": "^0.0.5",
|
|
30
30
|
"@chainlink/contracts": "^1.3.0",
|
|
31
31
|
"@openzeppelin/contracts": "^5.2.0",
|
|
32
32
|
"@prb/math": "^4.1.0",
|
|
@@ -44,6 +44,14 @@ contract DeployPeriphery is Script, Sphinx {
|
|
|
44
44
|
/// @notice The nonce that gets used across all chains to sync deployment addresses and allow for new deployments of
|
|
45
45
|
/// the same bytecode.
|
|
46
46
|
uint256 private CORE_DEPLOYMENT_NONCE = 6;
|
|
47
|
+
|
|
48
|
+
/// @notice The address of the omnichain ruleset operator contract (e.g. JBOmnichainDeployer).
|
|
49
|
+
/// @dev TRUST ASSUMPTION: This address is granted implicit permission to launch rulesets, set terminals, and queue
|
|
50
|
+
/// rulesets on any project via the JBController (bypassing normal JBPermissions checks). A compromised or
|
|
51
|
+
/// incorrect operator address could manipulate any project's rulesets across chains.
|
|
52
|
+
/// @dev This address should correspond to the deterministic CREATE2 deployment of the omnichain deployer contract
|
|
53
|
+
/// from the nana-omnichain-deployers-v6 repository. Verify it matches the deployed address on all target chains
|
|
54
|
+
/// before running this script.
|
|
47
55
|
address private OMNICHAIN_RULESET_OPERATOR = address(0x8f5DED85c40b50d223269C1F922A056E72101590);
|
|
48
56
|
|
|
49
57
|
function configureSphinx() public override {
|
|
@@ -66,6 +74,9 @@ contract DeployPeriphery is Script, Sphinx {
|
|
|
66
74
|
}
|
|
67
75
|
|
|
68
76
|
function deploy() public sphinx {
|
|
77
|
+
// Validate the omnichain ruleset operator is set. See TRUST ASSUMPTION above.
|
|
78
|
+
require(OMNICHAIN_RULESET_OPERATOR != address(0), "Omnichain ruleset operator not set");
|
|
79
|
+
|
|
69
80
|
// Deploy the ETH/USD price feed.
|
|
70
81
|
IJBPriceFeed feed;
|
|
71
82
|
|
|
@@ -20,16 +20,12 @@ contract JBChainlinkV3PriceFeed is IJBPriceFeed {
|
|
|
20
20
|
error JBChainlinkV3PriceFeed_StalePrice(uint256 timestamp, uint256 threshold, uint256 updatedAt);
|
|
21
21
|
|
|
22
22
|
//*********************************************************************//
|
|
23
|
-
//
|
|
23
|
+
// --------------- public immutable stored properties ---------------- //
|
|
24
24
|
//*********************************************************************//
|
|
25
25
|
|
|
26
26
|
/// @notice The Chainlink feed that prices are reported from.
|
|
27
27
|
AggregatorV3Interface public immutable FEED;
|
|
28
28
|
|
|
29
|
-
//*********************************************************************//
|
|
30
|
-
// ---------------- public immutable stored properties --------------- //
|
|
31
|
-
//*********************************************************************//
|
|
32
|
-
|
|
33
29
|
/// @notice How many seconds old a Chainlink price update is allowed to be before considered "stale".
|
|
34
30
|
uint256 public immutable THRESHOLD;
|
|
35
31
|
|
|
@@ -19,7 +19,7 @@ contract JBChainlinkV3SequencerPriceFeed is JBChainlinkV3PriceFeed {
|
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
//*********************************************************************//
|
|
22
|
-
//
|
|
22
|
+
// --------------- public immutable stored properties ---------------- //
|
|
23
23
|
//*********************************************************************//
|
|
24
24
|
|
|
25
25
|
/// @notice How long the sequencer must be re-active in order to return a price.
|