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