@bannynet/core-v6 0.0.35 → 0.0.37

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/package.json CHANGED
@@ -1,21 +1,16 @@
1
1
  {
2
2
  "name": "@bannynet/core-v6",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/mejango/banny-retail-v6"
8
8
  },
9
9
  "files": [
10
- "CHANGELOG.md",
11
10
  "foundry.toml",
12
11
  "references/",
13
12
  "remappings.txt",
14
- "script/Add.Denver.s.sol",
15
- "script/Deploy.s.sol",
16
- "script/Drop1.s.sol",
17
- "script/helpers/",
18
- "script/outfit_drop/",
13
+ "script/",
19
14
  "src/"
20
15
  ],
21
16
  "engines": {
@@ -32,13 +27,14 @@
32
27
  "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'banny-core-v6'"
33
28
  },
34
29
  "dependencies": {
35
- "@bananapus/721-hook-v6": "^0.0.52",
36
- "@bananapus/buyback-hook-v6": "^0.0.48",
37
- "@bananapus/core-v6": "^0.0.55",
38
- "@bananapus/router-terminal-v6": "^0.0.45",
39
- "@bananapus/suckers-v6": "^0.0.48",
30
+ "@bananapus/721-hook-v6": "^0.0.54",
31
+ "@bananapus/buyback-hook-v6": "^0.0.49",
32
+ "@bananapus/core-v6": "^0.0.57",
33
+ "@bananapus/router-terminal-v6": "^0.0.46",
34
+ "@bananapus/suckers-v6": "^0.0.49",
35
+ "@croptop/core-v6": "^0.0.52",
40
36
  "@openzeppelin/contracts": "5.6.1",
41
- "@rev-net/core-v6": "^0.0.58",
37
+ "@rev-net/core-v6": "^0.0.61",
42
38
  "keccak": "3.0.4"
43
39
  },
44
40
  "devDependencies": {
@@ -4,10 +4,6 @@ pragma solidity 0.8.28;
4
4
  import {Hook721Deployment, Hook721DeploymentLib} from "@bananapus/721-hook-v6/script/helpers/Hook721DeploymentLib.sol";
5
5
  import {CoreDeployment, CoreDeploymentLib} from "@bananapus/core-v6/script/helpers/CoreDeploymentLib.sol";
6
6
  import {SuckerDeployment, SuckerDeploymentLib} from "@bananapus/suckers-v6/script/helpers/SuckerDeploymentLib.sol";
7
- import {
8
- RouterTerminalDeployment,
9
- RouterTerminalDeploymentLib
10
- } from "@bananapus/router-terminal-v6/script/helpers/RouterTerminalDeploymentLib.sol";
11
7
  import {
12
8
  RevnetCoreDeployment,
13
9
  RevnetCoreDeploymentLib
@@ -22,7 +18,6 @@ import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
22
18
  import {JBCurrencyIds} from "@bananapus/core-v6/src/libraries/JBCurrencyIds.sol";
23
19
  import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
24
20
  import {JBSplit} from "@bananapus/core-v6/src/structs/JBSplit.sol";
25
- import {JBTerminalConfig} from "@bananapus/core-v6/src/structs/JBTerminalConfig.sol";
26
21
  import {JBTokenMapping} from "@bananapus/suckers-v6/src/structs/JBTokenMapping.sol";
27
22
  import {REVAutoIssuance} from "@rev-net/core-v6/src/structs/REVAutoIssuance.sol";
28
23
  import {REVConfig} from "@rev-net/core-v6/src/structs/REVConfig.sol";
@@ -34,7 +29,6 @@ import {REV721TiersHookFlags} from "@rev-net/core-v6/src/structs/REV721TiersHook
34
29
  import {REVStageConfig} from "@rev-net/core-v6/src/structs/REVStageConfig.sol";
35
30
  import {REVSuckerDeploymentConfig} from "@rev-net/core-v6/src/structs/REVSuckerDeploymentConfig.sol";
36
31
  import {JBSuckerDeployerConfig} from "@bananapus/suckers-v6/src/structs/JBSuckerDeployerConfig.sol";
37
- import {IJBTerminal} from "@bananapus/core-v6/src/interfaces/IJBTerminal.sol";
38
32
 
39
33
  import {Sphinx} from "@sphinx-labs/contracts/contracts/foundry/SphinxPlugin.sol";
40
34
  import {Script} from "forge-std/Script.sol";
@@ -42,10 +36,10 @@ import {Script} from "forge-std/Script.sol";
42
36
  import {Banny721TokenUriResolver} from "./../src/Banny721TokenUriResolver.sol";
43
37
 
44
38
  struct BannyverseRevnetConfig {
39
+ JBAccountingContext[] accountingContextsToAccept;
45
40
  REVConfig configuration;
46
- JBTerminalConfig[] terminalConfigurations;
47
- REVSuckerDeploymentConfig suckerDeploymentConfiguration;
48
41
  REVDeploy721TiersHookConfig hookConfiguration;
42
+ REVSuckerDeploymentConfig suckerDeploymentConfiguration;
49
43
  }
50
44
 
51
45
  contract DeployScript is Script, Sphinx {
@@ -57,8 +51,6 @@ contract DeployScript is Script, Sphinx {
57
51
  RevnetCoreDeployment revnet;
58
52
  /// @notice tracks the deployment of the 721 hook contracts for the chain we are deploying to.
59
53
  Hook721Deployment hook;
60
- /// @notice tracks the deployment of the router terminal.
61
- RouterTerminalDeployment routerTerminal;
62
54
 
63
55
  BannyverseRevnetConfig bannyverseConfig;
64
56
 
@@ -113,14 +105,6 @@ contract DeployScript is Script, Sphinx {
113
105
  suckers = SuckerDeploymentLib.getDeployment(
114
106
  vm.envOr("NANA_SUCKERS_DEPLOYMENT_PATH", string("node_modules/@bananapus/suckers-v6/deployments/"))
115
107
  );
116
- // Get the deployment addresses for the 721 hook contracts for this chain.
117
- routerTerminal = RouterTerminalDeploymentLib.getDeployment(
118
- vm.envOr(
119
- "NANA_ROUTER_TERMINAL_DEPLOYMENT_PATH",
120
- string("node_modules/@bananapus/router-terminal-v6/deployments/")
121
- )
122
- );
123
-
124
108
  trustedForwarder = core.controller.trustedForwarder();
125
109
 
126
110
  bannyverseConfig = getBannyverseRevnetConfig();
@@ -130,22 +114,13 @@ contract DeployScript is Script, Sphinx {
130
114
  }
131
115
 
132
116
  function getBannyverseRevnetConfig() internal view returns (BannyverseRevnetConfig memory) {
133
- // The terminals that the project will accept funds through.
134
- JBTerminalConfig[] memory terminalConfigurations = new JBTerminalConfig[](2);
135
117
  JBAccountingContext[] memory accountingContextsToAccept = new JBAccountingContext[](1);
136
118
 
137
- // Accept the chain's native currency through the multi terminal.
119
+ // Accept the chain's native currency through the Revnet deployer's canonical multi terminal. The deployer
120
+ // registers its immutable router-terminal registry separately, so this config only needs accounting contexts.
138
121
  accountingContextsToAccept[0] =
139
122
  JBAccountingContext({token: JBConstants.NATIVE_TOKEN, decimals: DECIMALS, currency: NATIVE_CURRENCY});
140
123
 
141
- terminalConfigurations[0] =
142
- JBTerminalConfig({terminal: core.terminal, accountingContextsToAccept: accountingContextsToAccept});
143
-
144
- terminalConfigurations[1] = JBTerminalConfig({
145
- terminal: IJBTerminal(address(routerTerminal.registry)),
146
- accountingContextsToAccept: new JBAccountingContext[](0)
147
- });
148
-
149
124
  JBSplit[] memory splits = new JBSplit[](1);
150
125
  splits[0] = JBSplit({
151
126
  percent: JBConstants.SPLITS_TOTAL_PERCENT,
@@ -348,9 +323,8 @@ contract DeployScript is Script, Sphinx {
348
323
  REVSuckerDeploymentConfig({deployerConfigurations: suckerDeployerConfigurations, salt: SUCKER_SALT});
349
324
 
350
325
  return BannyverseRevnetConfig({
326
+ accountingContextsToAccept: accountingContextsToAccept,
351
327
  configuration: revnetConfiguration,
352
- terminalConfigurations: terminalConfigurations,
353
- suckerDeploymentConfiguration: suckerDeploymentConfiguration,
354
328
  hookConfiguration: REVDeploy721TiersHookConfig({
355
329
  baseline721HookConfiguration: REVBaseline721HookConfig({
356
330
  name: "Banny Retail",
@@ -372,7 +346,8 @@ contract DeployScript is Script, Sphinx {
372
346
  preventOperatorUpdatingMetadata: false,
373
347
  preventOperatorMinting: false,
374
348
  preventOperatorIncreasingDiscountPercent: false
375
- })
349
+ }),
350
+ suckerDeploymentConfiguration: suckerDeploymentConfiguration
376
351
  });
377
352
  }
378
353
 
@@ -430,11 +405,11 @@ contract DeployScript is Script, Sphinx {
430
405
  bannyverseConfig.hookConfiguration.baseline721HookConfiguration.tokenUriResolver = resolver;
431
406
 
432
407
  // Deploy the $BANNY Revnet.
433
- revnet.basic_deployer
408
+ revnet.basicDeployer
434
409
  .deployFor({
435
410
  revnetId: 0,
436
411
  configuration: bannyverseConfig.configuration,
437
- terminalConfigurations: bannyverseConfig.terminalConfigurations,
412
+ accountingContextsToAccept: bannyverseConfig.accountingContextsToAccept,
438
413
  suckerDeploymentConfiguration: bannyverseConfig.suckerDeploymentConfiguration,
439
414
  tiered721HookConfiguration: bannyverseConfig.hookConfiguration,
440
415
  allowedPosts: new REVCroptopAllowedPost[](0)
@@ -807,7 +807,7 @@ function generateBatchScript(batchNumber, tierIds, transferDataFunctions, items)
807
807
  JB721TiersHook hook = JB721TiersHook(hookAddress);
808
808
 
809
809
  // Get project ID from hook
810
- uint256 projectId = hook.PROJECT_ID();
810
+ uint256 projectId = hook.projectId();
811
811
 
812
812
  // Deploy the appropriate chain-specific migration contract with transfer data
813
813
  `;
@@ -1716,7 +1716,7 @@ contract AirdropOutfitsScript is Script, Sphinx {
1716
1716
  JB721TiersHook hook = JB721TiersHook(hookAddress);
1717
1717
 
1718
1718
  // Get project ID from hook
1719
- uint256 projectId = hook.PROJECT_ID();
1719
+ uint256 projectId = hook.projectId();
1720
1720
 
1721
1721
  // Deploy the appropriate chain-specific migration contract with transfer data
1722
1722
  if (chainId == 1) {
package/CHANGELOG.md DELETED
@@ -1,41 +0,0 @@
1
- # Changelog
2
-
3
- ## 0.0.33 — Bump v6 deps to nana-core-v6 0.0.53 cohort
4
-
5
- - `@bananapus/core-v6`: `^0.0.49 → ^0.0.53` ([PR #145](https://github.com/Bananapus/nana-core-v6/pull/145)).
6
- - `@bananapus/721-hook-v6`: `^0.0.49 → ^0.0.50`.
7
- - `@bananapus/buyback-hook-v6`: `^0.0.45 → ^0.0.46`.
8
- - `@bananapus/suckers-v6`: `^0.0.43 → ^0.0.46`.
9
- - All `JBRulesetMetadata` test literals patched to include `pauseCrossProjectFeeFreeInflows: false`.
10
-
11
- ## Scope
12
-
13
- This file describes the verified change from `banny-retail-v5` to the current `banny-retail-v6` repo.
14
-
15
- ## Current v6 surface
16
-
17
- - `Banny721TokenUriResolver`
18
- - `IBanny721TokenUriResolver`
19
-
20
- ## Summary
21
-
22
- - Decoration flows now handle previously equipped assets more defensively. The v6 test suite adds explicit regression coverage for removed tiers, failed return transfers, and stranded-asset scenarios.
23
- - Metadata management is broader than in v5. The resolver now manages description, external URL, and base URI together instead of only a base URI path.
24
- - Validation is stricter. v6 adds array-length checks on batch setters and extra checks around valid body and background categories before decoration logic proceeds.
25
- - The repo was upgraded to the v6 dependency set and Solidity `0.8.28`.
26
-
27
- ## Verified deltas
28
-
29
- - `setSvgBaseUri(...)` was replaced by `setMetadata(description, url, baseUri)`.
30
- - Metadata JSON is no longer hardcoded around a fixed description and external URL. Those values now come from contract state.
31
- - `pricingContext()` consumption changed with the v6 721 hook and now uses the two-value return shape.
32
- - The resolver adds explicit `Banny721TokenUriResolver_ArrayLengthMismatch()` and `Banny721TokenUriResolver_BannyBodyNotBodyCategory()` errors.
33
- - Outfit and background handling now includes logic intended to preserve attachment state when a previously equipped asset cannot be returned cleanly.
34
- - (L-1) `_storeOutfitsWithRetained` now verifies that no two merged outfits share the same category after sorting. A retained outfit whose transfer failed could previously duplicate a category supplied in the new outfit set, leading to rendering artifacts. The new `Banny721TokenUriResolver_DuplicateCategory()` error prevents this.
35
- - Gas optimizations: all `for` loops use `unchecked { ++i; }` increments, `_sortOutfitsByCategory` pre-computes categories to avoid repeated external calls during sort comparisons, `_msgSender()` is cached once per entry point to avoid repeated ERC-2771 context reads, and the mannequin SVG style string is inlined to remove redundant `string.concat` overhead.
36
-
37
- ## Migration notes
38
-
39
- - Treat `setMetadata` as the metadata-management entry point. v5 assumptions around a base-URI-only setter no longer fit this repo.
40
- - Decoration flows should be reviewed for failure handling, especially if an integration assumed every previously equipped NFT could always be transferred back out.
41
- - Event and error expectations should be regenerated from the v6 ABI rather than copied from v5.