@rev-net/core-v6 0.0.61 → 0.0.62
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/REVDeployer.sol +12 -9
- package/src/interfaces/IREVDeployer.sol +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.62 — Omit unset router terminal registry
|
|
4
|
+
|
|
5
|
+
- `REVDeployer` now omits `ROUTER_TERMINAL_REGISTRY` from the canonical terminal configuration when it was
|
|
6
|
+
constructed with `address(0)`.
|
|
7
|
+
- This supports chains where the router terminal stack is unavailable while still launching revnets with the canonical
|
|
8
|
+
multi terminal.
|
|
9
|
+
|
|
3
10
|
## 0.0.56 — Bump v6 deps to nana-core-v6 0.0.53 cohort
|
|
4
11
|
|
|
5
12
|
- `@bananapus/core-v6`: `^0.0.48 → ^0.0.53` ([PR #145](https://github.com/Bananapus/nana-core-v6/pull/145)).
|
package/package.json
CHANGED
package/src/REVDeployer.sol
CHANGED
|
@@ -174,8 +174,8 @@ contract REVDeployer is ERC2771Context, IREVDeployer, IERC721Receiver {
|
|
|
174
174
|
/// @param controller The controller to use for launching and operating the Juicebox projects which will be revnets.
|
|
175
175
|
/// @param multiTerminal The canonical terminal that holds revnet treasury balances. Assumed to be a valid
|
|
176
176
|
/// deployment-time dependency.
|
|
177
|
-
/// @param routerTerminalRegistry The canonical router terminal registry used for alternate payment routes.
|
|
178
|
-
///
|
|
177
|
+
/// @param routerTerminalRegistry The canonical router terminal registry used for alternate payment routes. May be
|
|
178
|
+
/// the zero address on chains where the router terminal stack is unavailable.
|
|
179
179
|
/// @param suckerRegistry The registry to use for deploying and tracking each revnet's suckers.
|
|
180
180
|
/// @param feeRevnetId The Juicebox project ID of the revnet that will receive fees.
|
|
181
181
|
/// @param hookDeployer The deployer to use for revnet's tiered ERC-721 hooks.
|
|
@@ -353,9 +353,9 @@ contract REVDeployer is ERC2771Context, IREVDeployer, IERC721Receiver {
|
|
|
353
353
|
|
|
354
354
|
/// @notice Build the canonical terminal configuration used by every revnet.
|
|
355
355
|
/// @dev `MULTI_TERMINAL` accepts the revnet's accounting contexts and owns the treasury/loan accounting surface.
|
|
356
|
-
/// `ROUTER_TERMINAL_REGISTRY` is registered without accounting contexts so users can pay through
|
|
357
|
-
/// without letting callers choose arbitrary terminals or loan sources.
|
|
358
|
-
///
|
|
356
|
+
/// When configured, `ROUTER_TERMINAL_REGISTRY` is registered without accounting contexts so users can pay through
|
|
357
|
+
/// the router path without letting callers choose arbitrary terminals or loan sources. Chains without the router
|
|
358
|
+
/// terminal stack use only `MULTI_TERMINAL`.
|
|
359
359
|
/// @param accountingContextsToAccept The accounting contexts the canonical multi terminal should accept.
|
|
360
360
|
/// @return terminalConfigurations The canonical terminal configuration for the revnet.
|
|
361
361
|
function _makeTerminalConfigurations(JBAccountingContext[] calldata accountingContextsToAccept)
|
|
@@ -363,12 +363,15 @@ contract REVDeployer is ERC2771Context, IREVDeployer, IERC721Receiver {
|
|
|
363
363
|
view
|
|
364
364
|
returns (JBTerminalConfig[] memory terminalConfigurations)
|
|
365
365
|
{
|
|
366
|
-
|
|
366
|
+
bool hasRouterTerminalRegistry = address(ROUTER_TERMINAL_REGISTRY) != address(0);
|
|
367
|
+
terminalConfigurations = new JBTerminalConfig[](hasRouterTerminalRegistry ? 2 : 1);
|
|
367
368
|
terminalConfigurations[0] =
|
|
368
369
|
JBTerminalConfig({terminal: MULTI_TERMINAL, accountingContextsToAccept: accountingContextsToAccept});
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
if (hasRouterTerminalRegistry) {
|
|
371
|
+
terminalConfigurations[1] = JBTerminalConfig({
|
|
372
|
+
terminal: ROUTER_TERMINAL_REGISTRY, accountingContextsToAccept: new JBAccountingContext[](0)
|
|
373
|
+
});
|
|
374
|
+
}
|
|
372
375
|
}
|
|
373
376
|
|
|
374
377
|
/// @notice Returns the permissions that the operator should have for a revnet.
|
|
@@ -165,7 +165,7 @@ interface IREVDeployer {
|
|
|
165
165
|
function PUBLISHER() external view returns (CTPublisher);
|
|
166
166
|
|
|
167
167
|
/// @notice The canonical router terminal registry installed as a project terminal for alternate payment routes.
|
|
168
|
-
/// @return The router terminal registry contract, cast as a terminal.
|
|
168
|
+
/// @return The router terminal registry contract, cast as a terminal, or zero if unavailable on this chain.
|
|
169
169
|
function ROUTER_TERMINAL_REGISTRY() external view returns (IJBTerminal);
|
|
170
170
|
|
|
171
171
|
/// @notice The registry that deploys and tracks suckers for revnets.
|