@bannynet/core-v6 0.0.24 → 0.0.25

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.
Files changed (34) hide show
  1. package/README.md +2 -2
  2. package/foundry.toml +2 -1
  3. package/package.json +22 -12
  4. package/src/Banny721TokenUriResolver.sol +6 -0
  5. package/ADMINISTRATION.md +0 -87
  6. package/ARCHITECTURE.md +0 -101
  7. package/AUDIT_INSTRUCTIONS.md +0 -78
  8. package/RISKS.md +0 -80
  9. package/SKILLS.md +0 -42
  10. package/STYLE_GUIDE.md +0 -610
  11. package/USER_JOURNEYS.md +0 -190
  12. package/foundry.lock +0 -14
  13. package/slither-ci.config.json +0 -10
  14. package/sphinx.lock +0 -521
  15. package/test/Banny721TokenUriResolver.t.sol +0 -694
  16. package/test/BannyAttacks.t.sol +0 -326
  17. package/test/DecorateFlow.t.sol +0 -1091
  18. package/test/Fork.t.sol +0 -2026
  19. package/test/OutfitTransferLifecycle.t.sol +0 -395
  20. package/test/TestAuditGaps.sol +0 -724
  21. package/test/TestQALastMile.t.sol +0 -447
  22. package/test/audit/AntiStrandingRetention.t.sol +0 -422
  23. package/test/audit/BurnedBodyStrandsAssets.t.sol +0 -163
  24. package/test/audit/DuplicateCategoryRetention.t.sol +0 -163
  25. package/test/audit/MergedOutfitExclusivity.t.sol +0 -228
  26. package/test/audit/MigrationHelperVerificationBypass.t.sol +0 -102
  27. package/test/audit/TryTransferFromStrandsAssets.t.sol +0 -197
  28. package/test/regression/ArrayLengthValidation.t.sol +0 -57
  29. package/test/regression/BodyCategoryValidation.t.sol +0 -147
  30. package/test/regression/BurnedTokenCheck.t.sol +0 -186
  31. package/test/regression/CEIReorder.t.sol +0 -209
  32. package/test/regression/ClearMetadata.t.sol +0 -52
  33. package/test/regression/MsgSenderEvents.t.sol +0 -153
  34. package/test/regression/RemovedTierDesync.t.sol +0 -346
package/USER_JOURNEYS.md DELETED
@@ -1,190 +0,0 @@
1
- # User Journeys
2
-
3
- ## Repo Purpose
4
-
5
- This repo is the Banny-specific composition and metadata layer on top of a Juicebox 721 collection. It owns attachment custody, compatibility rules, outfit locks, and rendered token metadata. It does not own tier pricing, treasury accounting, or mint eligibility outside resolver-specific checks.
6
-
7
- ## Primary Actors
8
-
9
- - collection operators publishing bodies, outfits, backgrounds, and metadata
10
- - collectors equipping and unequipping avatar pieces
11
- - auditors reviewing custody, lock, and rendering behavior
12
-
13
- ## Key Surfaces
14
-
15
- - `Banny721TokenUriResolver`: custody, compatibility, locks, and rendered SVG metadata
16
- - `decorateBannyWith(...)`: equips outfits and a background to a body and returns old items when possible
17
- - `lockOutfitChangesFor(...)`: freezes appearance changes for the fixed lock window
18
- - `setSvgHashesOf(...)` / `setSvgContentsOf(...)`: publish or repair art payloads
19
- - `setMetadata(...)` / `setProductNames(...)`: update collection metadata and UPC naming
20
-
21
- ## Journey 1: Mint A Body, Outfit, And Background Set
22
-
23
- **Actor:** collector.
24
-
25
- **Intent:** acquire the pieces needed to build a composed Banny.
26
-
27
- **Preconditions**
28
-
29
- - the Banny collection is live through the 721 hook
30
- - the required body, outfit, and background tiers exist
31
-
32
- **Main Flow**
33
-
34
- 1. Mint the body, outfit, and background NFTs through the underlying 721 project.
35
- 2. Keep mint pricing and issuance assumptions anchored in the 721 hook, not this repo.
36
- 3. Move to this resolver only once the user owns compatible pieces.
37
-
38
- **Failure Modes**
39
-
40
- - the wrong tiers are minted or the pieces are incompatible
41
- - teams misread this repo as the minting or accounting surface
42
-
43
- **Postconditions**
44
-
45
- - the user holds the components needed for later composition
46
-
47
- ## Journey 2: Dress A Banny And Put Accessories Into Resolver Custody
48
-
49
- **Actor:** body owner.
50
-
51
- **Intent:** equip a body with a background and outfits so the resolver serves the composed avatar.
52
-
53
- **Preconditions**
54
-
55
- - the caller controls the body and the accessories being equipped
56
- - no active outfit lock blocks the change
57
- - the selected pieces are compatible by category and collection rules
58
-
59
- **Main Flow**
60
-
61
- 1. Call `decorateBannyWith(...)` for the target body.
62
- 2. The resolver checks compatibility and diffs old versus new attachments.
63
- 3. Equipped accessories move into resolver custody while attached.
64
- 4. The token URI for the body now reflects the combined SVG and metadata.
65
-
66
- **Failure Modes**
67
-
68
- - duplicate outfit categories or incompatible combinations are provided
69
- - transfer-back of previously attached items fails, leaving retained custody state for later recovery
70
- - reviewers forget that the resolver, not the wallet, holds equipped accessories while active
71
-
72
- **Postconditions**
73
-
74
- - the body renders with the new composition
75
- - attached accessories stay in resolver custody until replaced or cleared
76
-
77
- ## Journey 3: Lock A Banny's Appearance For A Period
78
-
79
- **Actor:** body owner.
80
-
81
- **Intent:** freeze the current appearance for the fixed lock window.
82
-
83
- **Preconditions**
84
-
85
- - the body already has a state worth freezing
86
- - the caller understands the lock is fixed-duration
87
-
88
- **Main Flow**
89
-
90
- 1. Call `lockOutfitChangesFor(...)`.
91
- 2. The resolver extends the lock for that body.
92
- 3. Future decoration or removal attempts must wait until the lock expires.
93
-
94
- **Failure Modes**
95
-
96
- - a seller locks just before transfer and the buyer cannot restyle immediately
97
- - integrations fail to show lock state before listing or sale
98
-
99
- **Postconditions**
100
-
101
- - appearance changes are blocked until the lock expires
102
-
103
- ## Journey 4: Publish Or Repair Onchain Art Assets
104
-
105
- **Actor:** collection operator or art publisher.
106
-
107
- **Intent:** make token URIs render complete onchain art.
108
-
109
- **Preconditions**
110
-
111
- - the relevant UPCs and content hashes are known
112
- - the operator understands that the hash is the commitment and SVG content must match it exactly
113
-
114
- **Main Flow**
115
-
116
- 1. Register hashes with `setSvgHashesOf(...)`.
117
- 2. Upload matching payloads with `setSvgContentsOf(...)`.
118
- 3. Re-check token URI output after publication or repair.
119
-
120
- **Failure Modes**
121
-
122
- - uploaded SVG does not match the committed hash
123
- - product names are missing or stale
124
- - teams assume the 721 hook owns rendered output when this repo does
125
-
126
- **Postconditions**
127
-
128
- - token URIs can render the intended onchain art payloads
129
-
130
- ## Journey 5: Update Collection Metadata And Product Catalog Entries
131
-
132
- **Actor:** collection operator.
133
-
134
- **Intent:** change collection-level metadata and human-readable product labels.
135
-
136
- **Preconditions**
137
-
138
- - the operator has authority over the resolver metadata surface
139
-
140
- **Main Flow**
141
-
142
- 1. Update collection metadata with `setMetadata(...)`.
143
- 2. Set or repair UPC names with `setProductNames(...)`.
144
- 3. Re-check a representative token URI so labels and art agree.
145
-
146
- **Failure Modes**
147
-
148
- - metadata and SVG state drift apart
149
- - operators update catalog labels without checking already-minted assets
150
-
151
- **Postconditions**
152
-
153
- - collection-level metadata and UPC names line up with the published art set
154
-
155
- ## Journey 6: Unequip And Recover Custodied Accessories
156
-
157
- **Actor:** body owner.
158
-
159
- **Intent:** recover attached accessories from resolver custody.
160
-
161
- **Preconditions**
162
-
163
- - the current lock window, if any, has expired
164
- - the owner understands that old pieces may only be returned as part of a later decoration update
165
-
166
- **Main Flow**
167
-
168
- 1. Replace or clear the equipped items through `decorateBannyWith(...)`.
169
- 2. The resolver attempts to return no-longer-equipped accessories.
170
- 3. Once returned, those NFTs can be transferred or reused independently.
171
-
172
- **Failure Modes**
173
-
174
- - previously equipped pieces remain retained because transfer-back failed
175
- - burned or otherwise unrecoverable pieces leave cosmetic phantom state until corrected
176
-
177
- **Postconditions**
178
-
179
- - no-longer-equipped accessories are either returned or remain explicitly retained pending recovery
180
-
181
- ## Trust Boundaries
182
-
183
- - this repo is trusted for custody of equipped accessories while attached
184
- - the underlying 721 hook remains the source of mint pricing, tier issuance, and treasury behavior
185
- - metadata correctness depends on operators publishing the intended SVG hashes and contents
186
-
187
- ## Hand-Offs
188
-
189
- - Use [nana-721-hook-v6](../nana-721-hook-v6/USER_JOURNEYS.md) for mint pricing, tier issuance, reserves, and treasury behavior.
190
- - Use this repo once the question is about custody, compatibility, outfit locks, or SVG composition.
package/foundry.lock DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "lib/base64": {
3
- "rev": "dcbf852ba545b3d15de0ac0ef88dce934c090c8e"
4
- },
5
- "lib/forge-std": {
6
- "rev": "ae570fec082bfe1c1f45b0acca4a2b4f84d345ce"
7
- },
8
- "lib/sphinx": {
9
- "branch": {
10
- "name": "v0.23.0",
11
- "rev": "5fb24a825f46bd6ae0b5359fe0da1d2346126b09"
12
- }
13
- }
14
- }
@@ -1,10 +0,0 @@
1
- {
2
- "detectors_to_exclude": "timestamp,uninitialized-local,naming-convention,solc-version,shadowing-local",
3
- "exclude_informational": true,
4
- "exclude_low": false,
5
- "exclude_medium": false,
6
- "exclude_high": false,
7
- "disable_color": false,
8
- "filter_paths": "(mocks/|test/|node_modules/|lib/)",
9
- "legacy_ast": false
10
- }