@bananapus/721-hook-v6 0.0.14 → 0.0.15
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/SKILLS.md
CHANGED
|
@@ -90,7 +90,7 @@ Tiered ERC-721 NFT hook for Juicebox V6 that mints NFTs when a project is paid a
|
|
|
90
90
|
| `JB721TiersHookFlags` | `bool noNewTiersWithReserves`, `bool noNewTiersWithVotes`, `bool noNewTiersWithOwnerMinting`, `bool preventOverspending`, `bool issueTokensForSplits` | `initialize`, `recordFlags` |
|
|
91
91
|
| `JB721TiersRulesetMetadata` | `bool pauseTransfers`, `bool pauseMintPendingReserves` | Packed into `JBRulesetMetadata.metadata` per-ruleset (bit 0 = pauseTransfers, bit 1 = pauseMintPendingReserves) |
|
|
92
92
|
| `JBPayDataHookRulesetConfig` | `uint48 mustStartAtOrAfter`, `uint32 duration`, `uint112 weight`, `uint32 weightCutPercent`, `IJBRulesetApprovalHook approvalHook`, `JBPayDataHookRulesetMetadata metadata`, `JBSplitGroup[] splitGroups`, `JBFundAccessLimitGroup[] fundAccessLimitGroups` | `JB721TiersHookProjectDeployer` -- wraps core ruleset config with `useDataHookForPay: true` hardcoded |
|
|
93
|
-
| `JBPayDataHookRulesetMetadata` | Same as `JBRulesetMetadata` minus `
|
|
93
|
+
| `JBPayDataHookRulesetMetadata` | Same as `JBRulesetMetadata` minus `useDataHookForPay` (hardcoded true) and `dataHook` (set to deployed hook). | `launchProjectFor`, `launchRulesetsFor`, `queueRulesetsOf` |
|
|
94
94
|
| `JBLaunchProjectConfig` | `string projectUri`, `JBPayDataHookRulesetConfig[] rulesetConfigurations`, `JBTerminalConfig[] terminalConfigurations`, `string memo` | `launchProjectFor` |
|
|
95
95
|
| `JBLaunchRulesetsConfig` | `uint56 projectId`, `JBPayDataHookRulesetConfig[] rulesetConfigurations`, `JBTerminalConfig[] terminalConfigurations`, `string memo` | `launchRulesetsFor` |
|
|
96
96
|
| `JBQueueRulesetsConfig` | `uint56 projectId`, `JBPayDataHookRulesetConfig[] rulesetConfigurations`, `string memo` | `queueRulesetsOf` |
|
|
@@ -157,7 +157,7 @@ Each tier has configurable voting power:
|
|
|
157
157
|
- **Reserve minting is permissionless** but governed by ruleset metadata. Anyone can call `mintPendingReservesFor` as long as `mintPendingReservesPaused` is not set in the current ruleset's metadata.
|
|
158
158
|
- **Reserve + owner-mint mutual exclusion**: Tiers with `allowOwnerMint: true` cannot have a `reserveFrequency`. The store rejects this combination during `recordAddTiers`.
|
|
159
159
|
- `setMetadata` uses `address(this)` as the sentinel for "no change" on `tokenUriResolver` (not `address(0)`). Passing `address(0)` will clear the resolver.
|
|
160
|
-
- `JBPayDataHookRulesetConfig` hardcodes `
|
|
160
|
+
- `JBPayDataHookRulesetConfig` hardcodes `useDataHookForPay: true` when wiring rulesets through the project deployer. All other metadata fields are passed through.
|
|
161
161
|
- The `_update` override in `JB721TiersHook` checks `tier.transfersPausable` and consults the current ruleset's metadata for `transfersPaused`. Transfers to `address(0)` (burns) are never blocked.
|
|
162
162
|
- **IERC2981 declared but not implemented**: `supportsInterface` returns `true` for `IERC2981`, but no `royaltyInfo` function is implemented. Callers querying `royaltyInfo` will get a revert. This appears intentional -- the interface is declared for future extension or to signal capability to marketplaces that may override behavior.
|
|
163
163
|
- **Tier splits**: Each tier can route a percentage of its mint price to configured split recipients. `splitPercent` is out of `JBConstants.SPLITS_TOTAL_PERCENT` (1,000,000,000). Split group IDs are `uint256(uint160(hookAddress)) | (uint256(tierId) << 160)`.
|
package/package.json
CHANGED
|
@@ -256,7 +256,7 @@ contract JB721TiersHookProjectDeployer is ERC2771Context, JBPermissioned, IJB721
|
|
|
256
256
|
pausePay: payDataRulesetConfig.metadata.pausePay,
|
|
257
257
|
pauseCreditTransfers: payDataRulesetConfig.metadata.pauseCreditTransfers,
|
|
258
258
|
allowOwnerMinting: payDataRulesetConfig.metadata.allowOwnerMinting,
|
|
259
|
-
allowSetCustomToken:
|
|
259
|
+
allowSetCustomToken: payDataRulesetConfig.metadata.allowSetCustomToken,
|
|
260
260
|
allowTerminalMigration: payDataRulesetConfig.metadata.allowTerminalMigration,
|
|
261
261
|
allowSetTerminals: payDataRulesetConfig.metadata.allowSetTerminals,
|
|
262
262
|
allowSetController: payDataRulesetConfig.metadata.allowSetController,
|
|
@@ -324,7 +324,7 @@ contract JB721TiersHookProjectDeployer is ERC2771Context, JBPermissioned, IJB721
|
|
|
324
324
|
pausePay: payDataRulesetConfig.metadata.pausePay,
|
|
325
325
|
pauseCreditTransfers: payDataRulesetConfig.metadata.pauseCreditTransfers,
|
|
326
326
|
allowOwnerMinting: payDataRulesetConfig.metadata.allowOwnerMinting,
|
|
327
|
-
allowSetCustomToken:
|
|
327
|
+
allowSetCustomToken: payDataRulesetConfig.metadata.allowSetCustomToken,
|
|
328
328
|
allowTerminalMigration: payDataRulesetConfig.metadata.allowTerminalMigration,
|
|
329
329
|
allowSetTerminals: payDataRulesetConfig.metadata.allowSetTerminals,
|
|
330
330
|
allowSetController: payDataRulesetConfig.metadata.allowSetController,
|
|
@@ -390,7 +390,7 @@ contract JB721TiersHookProjectDeployer is ERC2771Context, JBPermissioned, IJB721
|
|
|
390
390
|
pausePay: payDataRulesetConfig.metadata.pausePay,
|
|
391
391
|
pauseCreditTransfers: payDataRulesetConfig.metadata.pauseCreditTransfers,
|
|
392
392
|
allowOwnerMinting: payDataRulesetConfig.metadata.allowOwnerMinting,
|
|
393
|
-
allowSetCustomToken:
|
|
393
|
+
allowSetCustomToken: payDataRulesetConfig.metadata.allowSetCustomToken,
|
|
394
394
|
allowTerminalMigration: payDataRulesetConfig.metadata.allowTerminalMigration,
|
|
395
395
|
allowSetTerminals: payDataRulesetConfig.metadata.allowSetTerminals,
|
|
396
396
|
allowSetController: payDataRulesetConfig.metadata.allowSetController,
|
|
@@ -11,6 +11,8 @@ pragma solidity ^0.8.0;
|
|
|
11
11
|
/// during the funding cycle.
|
|
12
12
|
/// @custom:member allowOwnerMinting A flag indicating if the project owner or an operator with the `MINT_TOKENS`
|
|
13
13
|
/// permission from the owner should be allowed to mint project tokens on demand during this ruleset.
|
|
14
|
+
/// @custom:member allowSetCustomToken A flag indicating if the project owner can set the project's token to a custom
|
|
15
|
+
/// ERC-20.
|
|
14
16
|
/// @custom:member allowTerminalMigration A flag indicating if migrating terminals should be allowed during this
|
|
15
17
|
/// ruleset.
|
|
16
18
|
/// @custom:member allowSetTerminals A flag indicating if a project's terminals can be added or removed.
|
|
@@ -33,6 +35,7 @@ struct JBPayDataHookRulesetMetadata {
|
|
|
33
35
|
bool pausePay;
|
|
34
36
|
bool pauseCreditTransfers;
|
|
35
37
|
bool allowOwnerMinting;
|
|
38
|
+
bool allowSetCustomToken;
|
|
36
39
|
bool allowTerminalMigration;
|
|
37
40
|
bool allowSetTerminals;
|
|
38
41
|
bool allowSetController;
|
|
@@ -814,6 +814,7 @@ contract Test_TiersHook_E2E is TestBaseWorkflow {
|
|
|
814
814
|
pausePay: false,
|
|
815
815
|
pauseCreditTransfers: false,
|
|
816
816
|
allowOwnerMinting: true,
|
|
817
|
+
allowSetCustomToken: false,
|
|
817
818
|
allowTerminalMigration: false,
|
|
818
819
|
allowSetTerminals: false,
|
|
819
820
|
allowSetController: false,
|
|
@@ -908,6 +909,7 @@ contract Test_TiersHook_E2E is TestBaseWorkflow {
|
|
|
908
909
|
pausePay: false,
|
|
909
910
|
pauseCreditTransfers: false,
|
|
910
911
|
allowOwnerMinting: true,
|
|
912
|
+
allowSetCustomToken: false,
|
|
911
913
|
allowTerminalMigration: false,
|
|
912
914
|
allowSetTerminals: false,
|
|
913
915
|
allowSetController: false,
|
package/test/Fork.t.sol
CHANGED
|
@@ -205,6 +205,7 @@ contract ERC20TierSplitFork is Test {
|
|
|
205
205
|
pausePay: false,
|
|
206
206
|
pauseCreditTransfers: false,
|
|
207
207
|
allowOwnerMinting: true,
|
|
208
|
+
allowSetCustomToken: false,
|
|
208
209
|
allowTerminalMigration: false,
|
|
209
210
|
allowSetTerminals: false,
|
|
210
211
|
allowSetController: false,
|
|
@@ -280,6 +281,7 @@ contract ERC20TierSplitFork is Test {
|
|
|
280
281
|
pausePay: false,
|
|
281
282
|
pauseCreditTransfers: false,
|
|
282
283
|
allowOwnerMinting: true,
|
|
284
|
+
allowSetCustomToken: false,
|
|
283
285
|
allowTerminalMigration: false,
|
|
284
286
|
allowSetTerminals: false,
|
|
285
287
|
allowSetController: false,
|