@black-market/sdk 0.6.4 → 0.7.0

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 (82) hide show
  1. package/README.md +28 -4
  2. package/dist/addresses.d.ts +1 -1
  3. package/dist/addresses.js +4 -4
  4. package/dist/launch.d.ts +61 -0
  5. package/dist/launch.d.ts.map +1 -1
  6. package/dist/launch.js +171 -6
  7. package/dist/launch.js.map +1 -1
  8. package/dist/lifecycle/abi.d.ts +1999 -253
  9. package/dist/lifecycle/abi.d.ts.map +1 -1
  10. package/dist/lifecycle/abi.js +43 -14
  11. package/dist/lifecycle/abi.js.map +1 -1
  12. package/dist/lifecycle/allocations.d.ts +11 -0
  13. package/dist/lifecycle/allocations.d.ts.map +1 -0
  14. package/dist/lifecycle/allocations.js +36 -0
  15. package/dist/lifecycle/allocations.js.map +1 -0
  16. package/dist/lifecycle/calibration.d.ts +19 -0
  17. package/dist/lifecycle/calibration.d.ts.map +1 -0
  18. package/dist/lifecycle/calibration.js +65 -0
  19. package/dist/lifecycle/calibration.js.map +1 -0
  20. package/dist/lifecycle/deployments/fixed-fee-pool-hook-v1-20261008.d.ts +11 -0
  21. package/dist/lifecycle/deployments/fixed-fee-pool-hook-v1-20261008.d.ts.map +1 -0
  22. package/dist/lifecycle/deployments/fixed-fee-pool-hook-v1-20261008.js +10 -0
  23. package/dist/lifecycle/deployments/fixed-fee-pool-hook-v1-20261008.js.map +1 -0
  24. package/dist/lifecycle/index.d.ts +4 -2
  25. package/dist/lifecycle/index.d.ts.map +1 -1
  26. package/dist/lifecycle/index.js +4 -2
  27. package/dist/lifecycle/index.js.map +1 -1
  28. package/dist/lifecycle/markets.d.ts +170 -6
  29. package/dist/lifecycle/markets.d.ts.map +1 -1
  30. package/dist/lifecycle/markets.js +164 -37
  31. package/dist/lifecycle/markets.js.map +1 -1
  32. package/dist/lifecycle/planner.d.ts +7 -14
  33. package/dist/lifecycle/planner.d.ts.map +1 -1
  34. package/dist/lifecycle/planner.js +354 -400
  35. package/dist/lifecycle/planner.js.map +1 -1
  36. package/dist/lifecycle/presets.d.ts +62 -0
  37. package/dist/lifecycle/presets.d.ts.map +1 -0
  38. package/dist/lifecycle/presets.js +195 -0
  39. package/dist/lifecycle/presets.js.map +1 -0
  40. package/dist/lifecycle/progress.d.ts +5 -1
  41. package/dist/lifecycle/progress.d.ts.map +1 -1
  42. package/dist/lifecycle/progress.js +212 -53
  43. package/dist/lifecycle/progress.js.map +1 -1
  44. package/dist/lifecycle/rpc.d.ts +13 -2
  45. package/dist/lifecycle/rpc.d.ts.map +1 -1
  46. package/dist/lifecycle/rpc.js +92 -8
  47. package/dist/lifecycle/rpc.js.map +1 -1
  48. package/dist/lifecycle/simulation.d.ts +14 -4
  49. package/dist/lifecycle/simulation.d.ts.map +1 -1
  50. package/dist/lifecycle/simulation.js +383 -116
  51. package/dist/lifecycle/simulation.js.map +1 -1
  52. package/dist/lifecycle/transactions.d.ts +6 -0
  53. package/dist/lifecycle/transactions.d.ts.map +1 -0
  54. package/dist/lifecycle/transactions.js +40 -0
  55. package/dist/lifecycle/transactions.js.map +1 -0
  56. package/dist/lifecycle/types.d.ts +39 -2
  57. package/dist/lifecycle/types.d.ts.map +1 -1
  58. package/dist/lifecycle/types.js.map +1 -1
  59. package/docs/launch-lifecycle.md +228 -54
  60. package/examples/README.md +108 -18
  61. package/examples/generate-lifecycle-commitment-fixture.mjs +3 -1
  62. package/examples/launch-example-support.mjs +1 -1
  63. package/examples/launch-example.mjs +73 -26
  64. package/examples/launch-lifecycle-smoke.mjs +13 -11
  65. package/examples/launch.mjs +12 -11
  66. package/examples/quickstart.mjs +1 -1
  67. package/package.json +1 -1
  68. package/src/addresses.ts +4 -4
  69. package/src/launch.ts +213 -6
  70. package/src/lifecycle/abi.ts +43 -14
  71. package/src/lifecycle/allocations.ts +35 -0
  72. package/src/lifecycle/calibration.ts +59 -0
  73. package/src/lifecycle/deployments/fixed-fee-pool-hook-v1-20261008.ts +11 -0
  74. package/src/lifecycle/index.ts +4 -2
  75. package/src/lifecycle/markets.ts +169 -35
  76. package/src/lifecycle/planner.ts +326 -330
  77. package/src/lifecycle/presets.ts +243 -0
  78. package/src/lifecycle/progress.ts +193 -50
  79. package/src/lifecycle/rpc.ts +97 -9
  80. package/src/lifecycle/simulation.ts +370 -109
  81. package/src/lifecycle/transactions.ts +34 -0
  82. package/src/lifecycle/types.ts +35 -3
@@ -4,30 +4,140 @@
4
4
 
5
5
  The canonical authorities are the registry/certification/adapter/config contracts under
6
6
  `contracts/src/launch/lifecycle/v2`, typed hook deployers, and `contracts/src/launch/fees/v3`
7
- in the protocol repository. Plan identity is `LaunchPlanV1`. Pool-bound V4 uses **config 5**,
7
+ in the protocol repository. Plan identity is `LaunchPlanV1`. Pool-bound V4 uses **config 6**,
8
8
  canonical Abyss uses **config 1**, and generic current shared-V4 support uses **config 4**.
9
9
 
10
- ## 0.6.4 invocation-bound planning overlap
10
+ ## Unreleased transaction-first construction
11
+
12
+ Known chain/core/profile identities use frozen release construction metadata.
13
+ `getKnownLifecycleDeployment`, `getKnownLifecycleProfile` and
14
+ `listKnownLifecycleProfiles` are pure, browser-safe selectors. Profile selection
15
+ accepts either `KnownLifecycleProfile` keys or exact profile IDs.
16
+ `KnownLifecycleHook.FixedFeePoolV1` identifies the shipped contract class, whose current constructor is V2.
17
+ Unknown identities return no preset; explicit `readLifecycleProfiles` and unlisted
18
+ profile construction retain live discovery/certification. Presets describe release
19
+ availability, never current admission, and contain no `admitted` claim.
20
+ The current Robinhood preset is the mined October8 config6 graph, with its own
21
+ addresses, runtime pins, creation-code chunks, profile/schema and 20-word V2
22
+ constructor. Historical config5 codecs and 18-word V1 ABIs remain explicit for
23
+ existing deployments, but October5 evidence is not relabeled or selected as the
24
+ current preset. Explicit live discovery certifies unlisted deployments from actual
25
+ pinned reads.
26
+
27
+ `prepareAndPlanLifecycleLaunch` compiles the exact requested mode before native
28
+ execution calibration. Known construction uses local commitments and hook
29
+ creation code, mines salts once and compares every final constructor binding.
30
+ Token prediction remains a genuine pinned factory read; advancing the block
31
+ during asynchronous mining can require a second prediction. Current progress,
32
+ receipts, nonce/confirmation gates, exact native proof and final canonical guards
33
+ remain authoritative. Public discovery/constructor boundaries observe the current
34
+ chain; policy callbacks are resolved freshly rather than cached as constant values.
35
+
36
+ Optional `buySlippageBps` (integer 0–9999) protects **every ordered buy** from its
37
+ actual diagnostic receipt output using `floor(output * (10000 - bps) / 10000)`.
38
+ The diagnostic candidate is never admitted or returned for execution. Only the
39
+ complete final protected commitment can pass measurement and validated replay.
40
+ Protection is available only for an unstarted launch; omission preserves minima.
41
+
42
+ `buildLaunchTransactions({ plan, mode, preparationBatches? })` is a pure unsigned
43
+ compiler. Staged preparation counts must cover all markets exactly. Every command
44
+ carries the full plan; `PlannedLaunch.totalCalldataBytes` sums exact remaining
45
+ command bytes, including approvals. Splitting preparation cannot reduce this
46
+ per-command calldata or partition mint/lock/all-buys/public-opening activation.
47
+
48
+ Atomic and staged are explicit choices. Only proven compute/gas-envelope capacity
49
+ can partition empty preparations. Semantic, opaque `DeploymentFailed`, source,
50
+ provider-clamp and byte-cap refusals do not authorize retries or partitioning.
51
+ Native explicit OOG recognizes simulator VM code `-32015` and compatible `-32000`,
52
+ not near-cap gas consumption. Both activation receipt and event counts must match
53
+ the committed positions. Failure DTOs expose safe classifications/numeric facts,
54
+ not raw provider messages. Abort closes continuations, including unsupported adapters.
55
+
56
+ `deriveLaunchPositionRanges` requires a source-defined Black Market
57
+ `distributionPreset`: `"early-scarcity"`, `"staircase"` or `"smooth-ramp"`.
58
+ Inventory weights, 64 active spacing steps and intentional gaps follow
59
+ `black-market/apps/web/src/lib/launch.ts`. Early Scarcity widens sparse bands;
60
+ Staircase inserts three-step gaps only between new inventory shelves; Smooth Ramp
61
+ keeps gently narrowing bands contiguous. The SDK defaults to five positions and
62
+ supports counts from 2 through 16. Arbitrary equal-tick fractions of the distance
63
+ to a protocol boundary are not these presets.
64
+ For Staircase, `staircaseBoundaries: "adjacent"` explicitly removes the empty
65
+ shelf gaps while retaining the source inventory weights and widths. The default
66
+ `"source-gaps"` preserves the original topology. Adjacent positions share an
67
+ exact spacing-aligned tick; overlap is not required for continuous price.
68
+ An empty gap can move the pool price without exchanging tokens in that interval.
69
+
70
+
71
+ `extendFinalRangeToBoundary` defaults to `false`. Explicitly enabling it replaces
72
+ only the final band's far endpoint with the usable spacing-aligned protocol
73
+ boundary, preserving every earlier band and the final band's near endpoint.
74
+ The complete canonical preset must fit before this extension is applied.
75
+ `boundaryTick` and `boundarySqrtPriceX96` always describe that finite protocol
76
+ boundary; endpoint sqrt ratios are not exclusive swap-price guards.
77
+
78
+ Pass the raw token budget for **one pool**. Each position exposes `inventoryBps`
79
+ and its pre-mint `allocatedTokenAmount` cap: all but the last allocation floor
80
+ their basis-point share, and the last receives the exact remaining budget.
81
+ All caps and funded liquidities must be positive. `maxTokenAmount` equals the intended
82
+ `allocatedTokenAmount`, including any mint-rounding residual; `tokenAmountMaximum`
83
+ equals the pool budget. Both venues use the maximum exact budget-safe integer liquidity:
84
+ one additional liquidity unit would exceed that position's allocated cap.
85
+ `unspentTokenAmount` is the budget minus the canonical rounded-up expected mint
86
+ debit, not an extra allocation or creator reserve. Do not add it to `tokenAmountMaximum`.
87
+ Current admission requires position maxima to sum exactly to each market budget and
88
+ market budgets to sum exactly to minted supply. The SDK planner and pure compiler
89
+ enforce these equalities for every supported venue. The orchestrator burns every
90
+ actual leftover before any buy. Positive int128 liquidity and V4 signed settlement
91
+ limits remain enforced; arbitrary caller plans still need complete live admission.
92
+
93
+ The existing ordering convention is `launchedTokenIsQuote: true` for launched
94
+ token0. Gross liquidity must fit `maxLiquidityPerTick` at **each endpoint**;
95
+ adjacent bands share their endpoint's gross capacity, while the sum of disjoint
96
+ positions is not capped as if all began at launch. `openingActiveLiquidity`
97
+ reflects the actual `[tickLower, tickUpper)` opening state. Token0 starts in the
98
+ first band; token1 has zero opening-active liquidity until a downward quote buy
99
+ crosses the opening upper endpoint. `buySideLiquidity` is only the first
100
+ reachable band's liquidity, never the sum of all disjoint bands. Each position
101
+ also exposes exact endpoint sqrt ratios for display valuation.
102
+
103
+ No cross-review execution cache, caller certificate or admission skip exists.
104
+ Recovery and `buildNextTransaction` acquire fresh authority and retain separate
105
+ immediate-submission-provider preflight. Construction/proof is not submission.
106
+
107
+ ## Unreleased reviewed next envelopes
108
+
109
+ `BuildNextTransactionOptions.reviewedTransaction` optionally supplies an untrusted
110
+ previously reviewed immediate transaction. Omit it to construct a new envelope
111
+ with the existing greater-of-recommendation-and-twice-pinned-base fee strategy.
112
+ Supply it after review to validate that exact envelope, not to import cached
113
+ admission or waive current-state proof.
114
+
115
+ The SDK reconstructs the current unfinished commands from fresh canonical
116
+ progress, funding/allowances and deployment/profile authority. It matches
117
+ `id/kind/chainId/from/to/data/value` before using the reviewed gas or price.
118
+ Preparation batching remains SDK-derived, not caller-selected. Malformed,
119
+ wrong-step or changed envelopes refuse without returning executable calldata.
120
+
121
+ Fresh measurement and complete native validated replay use the held price.
122
+ The immediate replay uses the exact held gas; later unfinished steps receive
123
+ fresh gas bounds and remain in the same stateful sequence. Current compute,
124
+ poster, minimum headroom, tightening ceilings and full-sequence actual-balance
125
+ affordability still apply. Exact replay also checks gross-gas headroom without
126
+ counting Nitro's temporary compute hold. Neither natural child base fees nor
127
+ payer balances are overridden. A higher advisory quote alone is not a refusal;
128
+ an invalid current fee, insufficient gas or failed proof never silently raises
129
+ the held envelope.
130
+
131
+ Approvals/resets, atomic launches, every staged next step and cancellation use
132
+ this same contract. Cancellation retains its adapter-independent recovery policy.
133
+ Fresh receipt/nonce/confirmation and final canonical checks remain mandatory.
134
+ When supplied, `submissionClient` must estimate the exact held gas/price at
135
+ `latest`; it still proves only immediate transport acceptance, not wallet identity.
136
+ Returned estimates/admission are fresh and do not trust fields supplied with the
137
+ reviewed transaction. Generic EVM external data-fee callbacks now receive the
138
+ exact simulated `gas` and `gasPrice`.
11
139
 
12
- Confirmation-bound progress acquires its confirmed block and live chain identity
13
- together. Profile discovery joins chain identity with independent pinned registry,
14
- registration and adapter metadata. Chain-dependent certification still waits for
15
- validated chain evidence; chain failures reject the invocation rather than
16
- becoming an individual profile refusal. No source, canonical, eligibility,
17
- confirmation, nonce or receipt observation is removed.
18
140
 
19
- For batching-capable nonterminal, confirmation-safe plans, fresh simulation context
20
- starts alongside funding and pending-input validation. A private one-shot
21
- continuation binds the observations to the source client, plan/account/core/chain
22
- and pinned block. Only successful input validation consumes it. Refused inputs
23
- cannot start native probes, economic measurement/replay or controlled-fork work;
24
- late context rejection is handled immediately.
25
-
26
- Standalone simulation, serial clients and later staged/partitioning attempts
27
- resolve fresh context as before. Policy provenance, smart-account refusal,
28
- native Nitro capability/poster evidence, exact-gas replay and final live
29
- chain/canonical validation remain. This is read scheduling inside one invocation,
30
- not a public trusted-context option or cross-review execution cache.
31
141
 
32
142
  ## 0.6.3 certification and dependency-round reductions
33
143
 
@@ -217,16 +327,20 @@ capabilities and explicit atomic/staged behavior are unchanged.
217
327
  ## Deployed infrastructure
218
328
 
219
329
  Robinhood mainnet (`4663`) selects the mined `pool-launch-v1` deployment captured at block
220
- `80548181` in `contracts/deployments/launch/pool-launch-v1/20261005T053747Z-b5a7b88/manifest.json`.
221
- The manifest records successful receipts and canonical runtime evidence. The graph has two
222
- adapters and five admitted profiles: one fixed pool-bound V4 profile and four canonical Abyss
223
- variants. It does not deploy a shared V4 root.
330
+ `82880546` in `contracts/deployments/launch/pool-launch-v1/20261008T000141Z-e174ce6/manifest.json`.
331
+ The manifest records 22 successful receipts and canonical runtime evidence. The graph has two
332
+ adapters and five admitted profiles: one fixed pool-bound config6/V2 profile and four
333
+ canonical Abyss variants. It does not deploy a shared V4 root.
334
+ The current V4 profile is `0xf18140c2fb66a4202a0f22d62d6288bf7976db108de5381e5497aaed332a06f8`.
335
+ Its exact creation-code hash is `0x11c4c7b1f265ed708b7d53ab828c89d237ca821333daa808f1913986c6f8f1ab`;
336
+ the release artifact's unpatched runtime is not a deployed hook-instance runtime.
337
+ October5 config5/V1 evidence remains historical, never a substitute for this graph.
224
338
 
225
339
  | SDK field | Mainnet address |
226
340
  | --- | --- |
227
- | `launchOrchestrator` | `0xb75CBD17b9aecb7305B4DFcDa69595F783341c0E` |
228
- | `launchImplementationRegistry` | `0xaa8a410709B79cBA6F118F1be1FF568877A3B8Ee` |
229
- | `launchFeeOwnerRegistry` | `0x15778Aad08e12D458B2848F035860e2a8c2a0725` |
341
+ | `launchOrchestrator` | `0x91560876033d568d25CDe98C78c33ff8FC43962c` |
342
+ | `launchImplementationRegistry` | `0xB2B0f9F36617810D67b8fC175153Aa10024C1358` |
343
+ | `launchFeeOwnerRegistry` | `0x64b5ca1f21B8E84305b0e4D847924dca39Eb1fcb` |
230
344
 
231
345
  `getAddresses(4663)` exposes this graph; `robinhoodLaunchApplication` exposes the mined
232
346
  launch constants. Launch addresses on `31337` and `46631` remain zero unless configured.
@@ -248,17 +362,23 @@ independently certifies config-1 variants without an author envelope or royalty
248
362
  The admission EIP-712 domain is `Black Market Launch Registry`, version `2`.
249
363
 
250
364
  `LaunchBoundsV2` has five members: minimum/maximum tick spacing, maximum positions,
251
- maximum oracle cardinality, and fee-mode flags. Creators select valid LP/hook rates below
252
- 1,000,000 pips, a registered oracle configuration, and per-pool external-liquidity policy.
365
+ maximum oracle cardinality, and fee-mode flags. LP and SharedV4 hook fees remain below
366
+ 1,000,000 pips. Pool-bound minimum/maximum hook fees satisfy
367
+ `0 <= minimumHookFeePips <= hookFeePips <= 1,000,000`; sensitivity is an explicit uint32.
368
+ Creators also select a registered oracle configuration and per-pool external-liquidity policy.
253
369
  Author royalty ceilings are separate. Robinhood P1 `(1,4096)`, P2 `(6,4096)`, and P3 `(17,4096)`
254
370
  can use the same admitted profile; the selected oracle is checked at the pinned block.
255
371
  With `externalLiquidityDisabled=false`, third-party LP add/remove is allowed after opening.
256
372
  Permanent launch custody and pre-opening protection still apply.
257
373
 
258
- The deployed pool stack uses `FixedFeePoolHookV1`, `PoolHookDeployerV1`,
259
- `PoolMarketAdapterV1`, and `PoolFeeCollectorFactoryV1`. The complete `fixedFeePoolHookV1Abi`
260
- includes the exact **one-tuple, 18-field constructor**, callbacks, events, and errors from the
261
- mined artifact. Its fixed scalar fee calculation does not imply a scalar-argument constructor.
374
+ Config5 exports `fixedFeePoolHookV1Abi`, `poolHookDeployerV1Abi` and
375
+ `poolFeeCollectorFactoryV1Abi` for the actual V1 wire contracts. Config6 exports
376
+ `fixedFeePoolHookConfigV6Abi`, `poolHookDeployerConfigV6Abi` and
377
+ `poolFeeCollectorFactoryConfigV6Abi`, including its 20-word constructor and
378
+ `minimumHookFeePips()` / `feeSensitivityPipsSecondsPerTick()` getters. Existing
379
+ config5 hooks are not queried for nonexistent V2 fee getters. Constructor encoding
380
+ and initcode hashing require explicit `configVersion`; schema constants are
381
+ `V4_POOL_BOUND_LIFECYCLE_CONFIG_SCHEMA_V5` and `_V6`, never an ambiguous alias.
262
382
  Generic shared contracts are `FixedFeeSharedHookV1`, `SharedHookDeployerV1`, and
263
383
  `SharedMarketAdapterV1`; they require their own admitted deployment graph.
264
384
  Other current ABI exports include `sharedMarketAdapterV1Abi`, `sharedHookDeployerV1Abi`,
@@ -273,13 +393,13 @@ Validation uses `validateV4LifecycleMarket`; the collector factory getter is
273
393
  | --- | --- |
274
394
  | `readLifecycleProfiles({client, orchestrator, profileIds?, offset?, limit?})` | Bounded registry discovery, schema/topology dispatch, reviewed graph/terms certification and current registry admission. Default offset/limit is 0/100; explicit IDs can select a reviewed deployment's identities. |
275
395
  | `predictLifecycleToken({client, plan})` | Exact prediction from the explicit core. |
276
- | `preparePoolBoundLifecyclePlan({client, plan, signal?, onProgress?})` | Finalizes current config-5 salts offchain, then rechecks frozen plan, token-factory binding and exact deployment metadata. Does not deploy. |
396
+ | `prepareAndPlanLifecycleLaunch({client, account, plan, mode, limits?, fork?, receipts?, confirmations?, signal?, onProgress?})` | Mines config6/V2 salts offchain, verifies exact final deployment bindings and returns complete selected-mode admission under one SDK-owned fresh post-mining snapshot. No source-chain deployment or broadcast. |
277
397
  | `readPoolBoundHookDeployment({client, plan, marketIndex})` | Verifies typed factory, code chunks, constructor, normalized economics, initcode, salt, CREATE2 prediction and recorded provenance of existing code. Works with draft salts; permission bits are additionally required for executable predeployment. |
278
398
  | `buildPoolBoundHookDeploymentTransaction({client, plan, marketIndex})` | Optional permissionless typed `deploy(parameters,salt)` calldata. Does not create a token, register/initialize a pool, bind a collector or activate a launch. |
279
- | `planLaunch({client, account, plan, mode, limits?, fork?, receipts?, confirmations?})` | Validates domain/funding/admission and canonical progress, records the exact atomic attempt, and reviews only the explicitly selected mode. |
399
+ | `planLaunch({client, account, plan, mode, limits?, fork?, receipts?, confirmations?, signal?})` | Independently fresh domain/funding/profile/progress/execution admission of the already-finalized commitment, simulating only the explicitly selected mode. |
280
400
  | `simulateLaunchPlan({client, planned, limits?, fork?, receipts?, confirmations?})` | Rereads canonical state and proves remaining work. Preserves receipt evidence, economics and selected mode. |
281
401
  | `readLaunchProgress({client, planned, receipts?, confirmations?})` | Confirmation-bound canonical state, latest head, receipt/replacement/reorg status, account-nonce safety and actual prepared market/live state. |
282
- | `buildNextTransaction({client, planned, submissionClient?, limits?, fork?, receipts?, confirmations?, action?})` | Rereads progress, constraints and stateful proof before returning one admitted transaction. Optional `submissionClient` adds read-only exact immediate envelope preflight. `action: "cancel"` uses the stored commitment without requiring fresh adapter/profile admission. Terminal launches return `undefined`. |
402
+ | `buildNextTransaction({client, planned, reviewedTransaction?, submissionClient?, limits?, fork?, receipts?, confirmations?, action?})` | Rereads progress, constraints and complete stateful proof before returning one admitted transaction. Optional untrusted `reviewedTransaction` must match the current canonical next step and freshly prove its exact gas/price. Optional `submissionClient` adds read-only immediate exact-envelope preflight. `action: "cancel"` uses the stored commitment without requiring fresh adapter/profile admission. Terminal launches return `undefined`. |
283
403
 
284
404
  Clients may be viem public clients or raw `request({method,params})` RPC clients. Transport, wallet, signing and durable storage are application-owned. `PlannedLaunch` contains bigint values and live limit callbacks: persist `serializeLaunchPlan(plan)`, explicit execution mode, confirmation policy and receipt references, not the entire object.
285
405
 
@@ -328,21 +448,34 @@ Registry `authorizationDigest`, `beneficiaryNonces` and `registerProfile` ABIs e
328
448
  (uint16,uint24,int24,uint160,uint24,uint8,uint8,address,bool,bytes32,bytes32,bytes32,address,uint16,(int24,int24,uint128,bytes32,uint256)[])
329
449
  ```
330
450
 
331
- ### Pool-bound V4, version 5
451
+ ### Pool-bound V4, version 6
332
452
 
333
- `encodePoolBoundV4LifecycleMarketConfig` / `decodePoolBoundV4LifecycleMarketConfig` accept only inner version 5. Market `configVersion` is 5. Exact schema:
453
+ `encodePoolBoundV4LifecycleMarketConfig` / `decodePoolBoundV4LifecycleMarketConfig` accept only inner version 6. Market `configVersion` is 6. Exact schema:
334
454
 
335
455
  ```text
336
- (uint16,uint24,int24,uint160,uint24,uint8,uint8,address,bool,bytes32,bytes32,bytes32,bytes32,address,uint16,(int24,int24,uint128,bytes32,uint256)[])
456
+ (uint16,uint24,int24,uint160,uint24,uint24,uint32,uint8,uint8,address,bool,bytes32,bytes32,bytes32,bytes32,address,uint16,(int24,int24,uint128,bytes32,uint256)[])
337
457
  ```
338
458
 
339
- Both preserve LP/hook fees, tick spacing, opening price, fee mode/denominator/treasury, external-liquidity policy, and canonical oracle identity. Then come `profileId`, `termsDigest`, `developerBeneficiary`, and explicit `developerFeeBps`, followed by positions. Version 5 inserts `hookSalt` immediately before `profileId`. Every developer rate, including zero, is creator-selected. Copy terms from the selected profile's envelope. Inner/outer profile IDs must match; author identity is not the live payout. The creator rate cannot exceed either reviewed maximum or protocol ceiling.
459
+ Both preserve LP/hook fees, tick spacing, opening price, fee mode/denominator/treasury, external-liquidity policy, and canonical oracle identity. Pool-bound version6 inserts `uint24 minimumHookFeePips` and `uint32 feeSensitivityPipsSecondsPerTick` **immediately after `uint24 hookFeePips`**; `hookFeePips` remains the maximum. All other fields retain their order, including `hookSalt` immediately before `profileId`. Then come `profileId`, `termsDigest`, `developerBeneficiary`, explicit `developerFeeBps`, and positions. Every developer rate, including zero, is creator-selected. Copy terms from the selected profile's envelope. Inner/outer profile IDs must match; author identity is not the live payout. The creator rate cannot exceed either reviewed maximum or protocol ceiling.
460
+
461
+ All three hook fee settings are independently chosen per pool and frozen at launch.
462
+ One million pips is 100%, and 10,000 pips is 1%. `validatePoolBoundHookFees` validates
463
+ integer `0 <= minimum <= maximum <= 1,000,000` and sensitivity `0..4,294,967,295`.
464
+ Sensitivity has units **fee-pips × seconds/tick**. For positive normalized,
465
+ oracle-clamped observed tick change over `ageSeconds`, the rate is
466
+ `min(maximum, minimum + floor(sensitivity * positiveObservedTickChange / ageSeconds))`.
467
+ Unavailable history, flat/falling observations and zero sensitivity use minimum;
468
+ maximum zero yields zero. No fixed percentage trigger or fixed seconds multiplier
469
+ is implicit in these values. Registered oracle normalization and movement clamping
470
+ remain authoritative.
340
471
 
341
472
  ```ts
342
473
  const profile = profiles.find((row) => row.id === selectedProfileId);
343
474
  if (!profile?.admitted || !profile.envelope || !profile.developerTerms) throw new Error("Selected profile is not reviewed/admitted");
344
475
  const config = encodePoolBoundV4LifecycleMarketConfig({
345
- version: 5, hookSalt: zeroHash, lpFeePips, tickSpacing, sqrtPriceX96, hookFeePips, feeMode,
476
+ version: 6, hookSalt: zeroHash, lpFeePips, tickSpacing, sqrtPriceX96,
477
+ hookFeePips: creatorMaximumFeePips, minimumHookFeePips: creatorMinimumFeePips,
478
+ feeSensitivityPipsSecondsPerTick: creatorSensitivityPipsSecondsPerTick, feeMode,
346
479
  protocolFeeDenominator: profile.envelope.protocolFeeDenominator,
347
480
  treasury: profile.envelope.protocolTreasury,
348
481
  externalLiquidityDisabled: creatorSelectedExternalLiquidityDisabled,
@@ -363,30 +496,32 @@ Abyss retains `encodeAbyssLifecycleMarketConfig` / `decodeAbyssLifecycleMarketCo
363
496
 
364
497
  ## Freeze and finalize bound economics
365
498
 
366
- Freeze chain/core/creator/nonce, token identity, sorted fee policies, all funding/budgets/positions/terms and ordered buys before mining. Create config 5 with the chosen bound profile's exact terms and a draft salt; never implicitly reinterpret a shared config.
499
+ Freeze chain/core/creator/nonce, token identity, sorted fee policies, all funding/budgets/positions/terms and ordered buys before mining. Create config6 with all three creator fee settings, the chosen bound profile's exact terms and a draft salt; never implicitly reinterpret a shared or historical config5 config.
367
500
 
368
501
  ```ts
369
502
  const stop = new AbortController();
370
- const finalized = await preparePoolBoundLifecyclePlan({
371
- client, plan: draft, signal: stop.signal,
503
+ const finalized = await prepareAndPlanLifecycleLaunch({
504
+ client, account: draft.creator, plan: draft, mode: "staged", signal: stop.signal,
372
505
  onProgress: ({marketIndex, attempts, predictedHook}) => console.log(marketIndex, attempts.toString(), predictedHook),
373
506
  });
374
507
  const saved = serializeLaunchPlan(finalized.plan);
375
- const boundIndex = finalized.plan.markets.findIndex((market) => market.configVersion === 5);
508
+ if (!finalized.simulation.admitted) throw new Error(finalized.simulation.reason);
509
+ // Use finalized.progress and finalized.hookDeployments; do not immediately plan again.
510
+ const boundIndex = finalized.plan.markets.findIndex((market) => market.configVersion === 6);
376
511
  const optionalPredeploy = await buildPoolBoundHookDeploymentTransaction({client, plan: finalized.plan, marketIndex: boundIndex});
377
512
  // Inspect only; separately admit/authenticate/sign any optional predeployment.
378
513
  ```
379
514
 
380
- The collector supplies canonical normalized economic commitment and constructor metadata. `hashPoolBoundV4MarketCommitment` uses domain `black-market.pool-bound-market-economics.v1`: chain, core, registrar, predicted token, adapter/profile/quote/budget/version and encoded config hash with **only hookSalt zeroed**. Developer identity/digest/rate remain committed. The 18-word constructor freezes manager, registrar, oracle factory, core, locker, token/quote, fees/spacing/price/policy, economic commitment and position count. Salt is used verbatim by CREATE2, not as a constructor argument.
515
+ The collector supplies canonical normalized economic commitment and constructor metadata. `hashPoolBoundV4MarketCommitment` uses domain `black-market.pool-bound-market-economics.v1`: chain, core, registrar, predicted token, adapter/profile/quote/budget/version and encoded config hash with **only hookSalt zeroed**. Minimum, maximum and sensitivity, plus developer identity/digest/rate, remain committed. `PoolBoundHookParametersV2` and `poolBoundHookParametersV2Components` are the current constructor API; there is no V1 alias. The constructor freezes manager, registrar, oracle factory, core, locker, token/quote, fees/spacing/price/policy, economic commitment and position count. Salt is used verbatim by CREATE2, not as a constructor argument. Local/remote constructor equality and deployed immutable getters bind both new values.
381
516
 
382
- Mining is cancellable/nonblocking; `abort()` raises `AbortError` and does not cancel an onchain launch. Persist the returned finalized plan, not the draft. A salt-only change preserves normalized economics but changes final plan hash. Other changes invalidate initcode/mining; concurrent mutation is refused. Normal next-step review rechecks token factory and the captured `hookDeployments` baseline. Predeployment is permissionless, but code presence or self-reported getters alone cannot be adopted as provenance. It does not register/initialize/seal/open a market and does not eliminate real code-deposit/setup gas.
517
+ Mining is cancellable/nonblocking; `abort()` raises `AbortError` and does not cancel an onchain launch. The miner reuses the exact CREATE2 preimage's immutable prefix/suffix and checks all 14 permission bits before materializing rejected-address progress at bounded macrotask boundaries. Persist the returned finalized plan, not the draft. A salt-only change preserves normalized economics but changes final plan hash. Other changes invalidate initcode/mining; concurrent mutation is refused. Normal next-step review rechecks token factory and the captured `hookDeployments` baseline. Predeployment is permissionless, but code presence or self-reported getters alone cannot be adopted as provenance. It does not register/initialize/seal/open a market and does not eliminate real code-deposit/setup gas.
383
518
 
384
519
  ## Explicit execution mode and indivisible activation
385
520
 
386
- Every planning call requires `mode: "atomic" | "staged"`. For an unstarted launch, `atomicAttempt` records the exact approval/funding plus atomic sequence independently of the requested graph.
521
+ Every planning call requires `mode: "atomic" | "staged"`. Only that requested mode receives economic simulation; staged does not compute or expose an unused atomic attempt.
387
522
 
388
523
  - Atomic: after funding prerequisites, token creation, empty infrastructure, all mint/lock/buys/public activation are one transaction.
389
- - Staged: prerequisites, `beginLaunch(Staged)`, contiguous empty `prepareMarkets` batches, then one `activateLaunch`. Preparation batches may shrink to fit.
524
+ - Staged: prerequisites, `beginLaunch(Staged)`, contiguous empty `prepareMarkets` batches, then one `activateLaunch`. An unclassified stateful preparation refusal may try bounded smaller empty batches, without claiming gas exhaustion. Reviewed decoded core/validator/registry/hook invariant errors, including `InvalidPreparationOrder`, `InvalidPhase` and constructor/configuration guards, stop that search. Unknown wrappers such as `DeploymentFailed`, generic error/panic data and near-cap consumption do not establish an inner cause.
390
525
  - Activation cannot split. If mint/lock/all buys/opening cannot fit, staged is also refused. No position/buy/minimum is omitted to manufacture success.
391
526
 
392
527
  No automatic atomic-to-staged fallback exists. Obtain separate consent to review the same commitment as staged. Both venues use token transfer restrictions plus activation-time canonical opening-state checks, not a pool gate. Manipulated opening price or preactivation liquidity fails verification; the token stays inactive and the launch remains Ready/cancellable. Failed activation rolls back every mint, seal, buy and opening together.
@@ -414,6 +549,20 @@ Fork discovery uses gross sequential estimates, not refund-reduced receipt gas a
414
549
  executable minimum. Explicit ceiling recovery preserves gasleft/EIP-150 validation and
415
550
  carries that successfully replayed ceiling, never a smaller unproved envelope.
416
551
 
552
+ Replay source, HTTP and malformed-response failures remain provisional with
553
+ `executionProof: "unavailable"` and do not retry economic execution. `AbortError`
554
+ propagates unchanged, including cancellation during supplied policy and Nitro getter
555
+ reads. A recognized execution refusal may discover at most one genuinely larger
556
+ validated envelope within the same legal compute/total limits. Without returned
557
+ failing-call evidence, `failedTransactionId` stays absent; an opaque RPC error does
558
+ not invent a failing transaction or authorize preparation partitioning.
559
+ Returned failures retain the actual exact-replay prefix and its first failing
560
+ transaction, never a transaction ID borrowed from permissive measurement. For the
561
+ first failed preparation only, reviewed invariant errors may decode native
562
+ `error.data` when raw `returnData` is empty; nonempty raw bytes take precedence.
563
+ Unknown errors, `Panic`, generic `Error` and deployment wrappers do not establish
564
+ a deterministic preparation invariant or an out-of-gas cause.
565
+
417
566
  Sequential backends:
418
567
 
419
568
  1. `eth_simulateV1`: ordered transactions with state carried between synthetic blocks, followed by exact validated replay.
@@ -441,6 +590,11 @@ steps whose execution cannot yet be independently estimated. It budgets poster g
441
590
  The buffered compute-discovery envelope plus buffered poster budget is carried into
442
591
  exact validated replay; an approximate poster quote is never subtracted from total
443
592
  gas use to certify exact compute fit.
593
+ Measurement waits for successful capability and candidate-specific poster evidence,
594
+ then uses the legal complete compute-plus-poster envelope. Near-cap gas consumption
595
+ does not diagnose OOG, constructor failure or collision. Unsupported/transport
596
+ evidence remains unavailable, and only a recognized execution-envelope refusal
597
+ can trigger bounded envelope discovery.
444
598
 
445
599
  A separate pinned validated simulation probes all three ArbOS/version/getter values
446
600
  against the canonical observations. Only that isolated capability probe temporarily
@@ -460,6 +614,19 @@ this complete envelope once; adding `posterFee` again would double-charge. A cal
460
614
  `estimateDataFee` is therefore rejected on Nitro. On generic EVM it retains its original
461
615
  semantics as a validated external fee added outside execution gas. Missing external fee
462
616
  does not manufacture an all-in estimate. All observations and limits refresh for build-next.
617
+ For initial construction, the exact legacy gas-price envelope is the greater of
618
+ the fresh RPC recommendation and twice the pinned base fee. This avoids
619
+ underpriced submission when `eth_gasPrice` lags the block base fee. Reviewed
620
+ envelopes retain their exact gas/price only after fresh full-sequence measurement,
621
+ native validated replay, current minimum headroom and affordability checks.
622
+ The held price need not equal a new recommendation or twice the current base fee;
623
+ natural child fees and the actual submission estimate must accept it. Replay,
624
+ affordability and submission use that same price, without a base-fee override.
625
+ A known aggregate budget whose legal minimum already exceeds its ceiling refuses
626
+ before capability probes or poster work; equality is allowed. A definitive returned
627
+ failure from the final exact replay skips a later payer-balance lookup, while
628
+ retaining fee/estimate validation and final canonical checks. Successful replay
629
+ still requires current actual-balance affordability.
463
630
 
464
631
  Source references: [ArbSys version encoding](https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/main/ArbSys.sol),
465
632
  [ArbGasInfo compute getters](https://github.com/OffchainLabs/nitro-precompile-interfaces/blob/main/ArbGasInfo.sol),
@@ -502,8 +669,12 @@ const planned = await planLaunch({ client, account: plan.creator, plan, mode: "a
502
669
  const submissionClient = {
503
670
  request: ({ method, params }) => activeProvider.request({ method, params }),
504
671
  };
505
- const next = await buildNextTransaction({ client, planned, receipts, submissionClient });
506
- // Freshly verify the active wallet account/connector/chain again, then review/sign next.
672
+ const reviewedTransaction = await buildNextTransaction({ client, planned, receipts, submissionClient });
673
+ // Present this exact envelope for user review. After explicit confirmation:
674
+ if (reviewedTransaction !== undefined) {
675
+ const next = await buildNextTransaction({ client, planned, receipts, submissionClient, reviewedTransaction });
676
+ // Recheck active account/connector/chain and strict exact-envelope equality before signing next.
677
+ }
507
678
  ```
508
679
 
509
680
  When supplied, `submissionClient` receives only read-only `eth_chainId` and
@@ -608,13 +779,16 @@ irreversible. The official SDK chain-4663 RPC is the default.
608
779
 
609
780
  The implementation imports public `@black-market/sdk`, resolves `getAddresses(4663)`,
610
781
  derives the creator from the key and discovers the actual admitted profiles. V4 requires
611
- bound topology/config `5`; Abyss requires exact adapter `profileId(3)` QUOTE_ORACLE/config
782
+ bound topology/config `6` on a new V2-constructor graph; Abyss requires exact adapter `profileId(3)` QUOTE_ORACLE/config
612
783
  `1`. It verifies wrapped-native binding/decimals and registered P1 oracle `(1,4096)`.
613
- All eight original token/reward/venue/position/mode cases retain their exact economics:
784
+ All eight original token/reward/venue/position/mode cases retain their inventory and workload:
614
785
  ERC20 `1_000_000e18` supply; ERC404 `10_000e18` supply / `100e18` NFT unit; selected
615
786
  staking/dividends and token-only burn; one through five permanent positions and ordered
616
787
  native-wrap opening buys. It saves identity/finalized salts/plans before execution and
617
788
  never changes mode, drops positions/buys or overrides failed admission.
789
+ V4 examples select the actual admitted version: config5 preserves fixed-fee V1
790
+ economics; config6 freezes max `10000`, min `1000` pips and sensitivity `7654321`
791
+ fee-pips × seconds/tick on its independently admitted graph.
618
792
  Optional `NFT_BASE_URI` provides an ERC404 base URI you actually host; its default is
619
793
  empty, with real NFT units/mirror behavior but no claim of hosted NFT metadata.
620
794
 
@@ -681,7 +855,7 @@ NFC/trimmed text, normalized URLs, fixed field order, and null absent optional v
681
855
  | --- | --- |
682
856
  | `LAUNCH_API_TEST_URL` | Required HTTP service root, e.g. `http://127.0.0.1:18763`; no implicit production target. |
683
857
  | `LAUNCH_API_TEST_CHAIN_ID` | Defaults to `4663`; must be configured on the test service. |
684
- | `LAUNCH_API_TEST_ORCHESTRATOR` | Defaults to `0xb75CBD17b9aecb7305B4DFcDa69595F783341c0E`; must match the service's signing domain. |
858
+ | `LAUNCH_API_TEST_ORCHESTRATOR` | Defaults to `getAddresses(4663).launchOrchestrator` (October8 mined graph); must match the service's signing domain. |
685
859
  | `LAUNCH_API_TEST_PRIVATE_KEY` | Required only for the explicit signed suite; disposable EOA key, never a production key. |
686
860
 
687
861
  ```sh
@@ -1,15 +1,17 @@
1
1
  # Examples
2
2
 
3
3
  The launch examples use the installed public `@black-market/sdk` package and viem,
4
- including when copied into a consumer project. The deployed chain-4663 graph uses
5
- pool-bound V4 config 5 and canonical Abyss config 1. Discovery is read-only; running
6
- a fixed launch example with configured wallet/API deliberately executes real writes.
4
+ including when copied into a consumer project. The current chain-4663 graph is the
5
+ October8 mined pool-bound V4 config6/V2 and canonical Abyss config1 deployment.
6
+ Historical October5 config5 evidence is not relabeled as the new graph. Discovery
7
+ is read-only; running a fixed launch example with configured wallet/API deliberately
8
+ executes real writes.
7
9
 
8
10
  | Script | Behavior |
9
11
  | --- | --- |
10
12
  | `quickstart.mjs` | Reads the current mainnet orchestrator, checks its registry binding, and discovers admitted profiles. No wallet or writes. |
11
- | `launch.mjs` | Reviews/reconstructs an explicit saved plan and selected atomic/staged mode; optional offchain config-5 salt mining. Prints simulation, progress, and an admitted unsigned next transaction when evidence permits. |
12
- | `generate-lifecycle-commitment-fixture.mjs` | Independent offline ABI reference for current config-4/Abyss commitment bytes/hash/identity, not a deployment or executable launch. |
13
+ | `launch.mjs` | Reviews/reconstructs an explicit saved plan and selected atomic/staged mode; optional offchain config6/V2 salt mining. Prints simulation, progress, and an admitted unsigned next transaction when evidence permits. |
14
+ | `generate-lifecycle-commitment-fixture.mjs` | Frozen independent historical config4/Abyss ABI bytes/hash/identity vector. Its pre-cutover allocations are not an executable 0.7.0 plan. |
13
15
  | `launch-lifecycle-smoke.mjs` | Actual SDK launch/recovery/custody/fee operations, only on an explicitly authorized owned disposable loopback graph. |
14
16
  | `launch-erc20-*.mjs`, `launch-erc404-*.mjs` | Eight independent zero-parameter launch cases with actual SDK admission, local signing, chain verification and mandatory API publication/indexing. |
15
17
 
@@ -37,10 +39,13 @@ node examples/launch.mjs \
37
39
  --plan plan.json --rpc https://rpc.mainnet.chain.robinhood.com/ --mode staged --mine
38
40
  ```
39
41
 
40
- `--mine` finalizes config-5 salts offchain and prints the final plan. Persist that exact
41
- commitment before begin. `--receipts receipts.json` and `--confirmations N` restore
42
- canonical recovery context. The CLI never signs, submits source-chain transactions,
43
- uploads metadata, or publishes a launch. Modes never fall back silently.
42
+ `--mine` uses `prepareAndPlanLifecycleLaunch` to finalize config6/V2 salts and admit the
43
+ requested mode in one SDK-owned invocation. Persist its exact returned plan before
44
+ begin. `--receipts receipt-references.json` takes a JSON array of SDK receipt
45
+ references, with bigint block numbers encoded as decimal strings; `--confirmations N`
46
+ restores the selected canonical recovery depth. The CLI checks source chain identity
47
+ before discovery. It never signs, submits source-chain transactions, uploads metadata,
48
+ or publishes a launch. Modes never fall back silently.
44
49
 
45
50
  Executable admission requires actual stateful measurement and exact validated replay.
46
51
  `--limits current-limits.json` is optional tightening policy, not a required backend:
@@ -53,6 +58,14 @@ generic EVM, not as a Nitro metering substitute. Unsigned review reports
53
58
  RPC to build-next. See the
54
59
  [lifecycle guide](../docs/launch-lifecycle.md#execution-constraints-and-stateful-simulation).
55
60
 
61
+ For a real new graph, create the saved plan using `readLifecycleProfiles` with its
62
+ explicit chain/core and admitted pool-bound config6 profile. Supply that graph's RPC
63
+ to `launch.mjs`; do not substitute the historical known preset. Applications may use
64
+ the existing `LAUNCH_ORCHESTRATOR`, `LAUNCH_IMPLEMENTATION_REGISTRY`, and
65
+ `LAUNCH_FEE_OWNER_REGISTRY` overrides from the same authentic deployment evidence.
66
+ The SDK certifies actual registry/creation-code/runtime/constructor bindings and
67
+ requires real execution proof; setting configuration does not certify a graph.
68
+
56
69
  ## Real HTTP metadata sessions
57
70
 
58
71
  The real HTTP integration suite uses the public `LaunchApiClient` against a separately
@@ -106,9 +119,17 @@ loaded once using Node's native `process.loadEnvFile`. No shell interpolation is
106
119
  Blank `RPC_URL` uses the SDK official Robinhood chain-4663 mainnet endpoint; HTTPS
107
120
  providers and explicit owned loopback HTTP execution RPCs are supported.
108
121
  The creator is derived locally from the key, and the deployment/WETH addresses come
109
- from `getAddresses(4663)`. The runner checks chain identity, EOA and deployed core,
110
- discovers admitted profiles, verifies the actual wrapped-native binding and reads
111
- the registered P1 `(1,4096)` oracle configuration. No fixture defines these facts.
122
+ from `getAddresses(4663)`. The runner checks chain identity, EOA, deployed core and
123
+ its configured registry binding, discovers admitted profiles, verifies the funding
124
+ escrow core/wrapped-native binding and reads the registered P1 `(1,4096)` oracle
125
+ configuration. No fixture defines these facts. V4 fixed cases require config6/V2;
126
+ an old config5 profile is not silently selected instead.
127
+ V4 fixed cases now encode max `10000`, min `1000` pips and sensitivity `7654321`
128
+ fee-pips × seconds/tick; all are immutable. The current defaults resolve the matching
129
+ October8 mined config6 graph. Position maxima exactly cover market budgets and budgets
130
+ exactly cover minted supply. Actual unused inventory burns before buys, never to the
131
+ creator. Verification accounts for burn `Transfer` logs, reduced `totalSupply`, an
132
+ empty core token balance, and creator balance equal only to paid opening-buy output.
112
133
  Optional `NFT_BASE_URI` supplies your actually hosted ERC404 NFT metadata base URI.
113
134
  Blank uses an empty base URI: NFT units/mirror behavior remain real, but the example
114
135
  does not claim hosted NFT metadata exists.
@@ -117,9 +138,10 @@ The fixed Robinhood examples require native sequential Nitro `eth_simulateV1`, i
117
138
  an isolated pinned ArbOS capability probe and exact fee-bearing replay. Generic
118
139
  Anvil/Hardhat forks cannot certify Nitro compute/poster metering and are not a fallback.
119
140
  Unsupported native simulation, insufficient funds or failed admission stop before API
120
- staging/broadcast. Each immediate next envelope is additionally preflighted read-only
121
- through the same execution RPC before signing. There is no mode fallback, admission
122
- override, automatic submission replay or reduced case.
141
+ staging/broadcast. Each immediate next envelope is additionally proved afresh against
142
+ the saved `reviewedTransaction` and preflighted read-only through the same execution
143
+ RPC before signing. Calldata, value, gas and gas price must remain exactly as reviewed.
144
+ There is no mode fallback, admission override, automatic submission replay or reduced case.
123
145
 
124
146
  ### Commands and fixed cases
125
147
 
@@ -147,10 +169,22 @@ node examples/launch-erc404-dividends-mixed.mjs
147
169
 
148
170
  ERC20 supply is `1_000_000e18`; ERC404 supply is `10_000e18`, NFT unit `100e18`.
149
171
  Positions retain `1000e18` liquidity and the case's exact ranges. Each ordered buy
150
- spends up to `0.001 ETH` through native-wrap funding. Rewards use 4000 bps where
151
- selected; token-only burn is 3000 bps in the burn case. V4 uses frozen registered
172
+ spends up to `0.001 ETH` through native-wrap funding. The unified SDK invocation sets
173
+ every ordered buy's minimum from its actual stateful diagnostic output with **50 bps
174
+ (0.5%) slippage**, then proves and saves only the final protected commitment. The draft's
175
+ one-wei minima are diagnostic inputs, never the submitted protection.
176
+ Rewards use 4000 bps where selected; token-only burn is 3000 bps in the burn case.
177
+ V4 uses frozen registered
152
178
  treasury/author terms with developer rate `0`; executor fee is 275 bps.
153
- Hook salts/random identities are finalized and saved before execution.
179
+ Hook salts/random identities are finalized and saved before execution. The shared
180
+ runner uses the combined preparation/admission result without an immediate second
181
+ planning pass. Staged cases simulate only staged work, never an unused atomic launch.
182
+
183
+ These are deliberately simple fixed-geometry consumer cases, not an FDV recipe:
184
+ equal position maxima partition each market budget exactly, while fixed liquidity
185
+ can spend less than those maxima. Consequently actual unused inventory can be
186
+ substantial, not merely one rounding unit. It burns; it is not creator inventory.
187
+ Use SDK pool/position recipe helpers when you need valuation-driven allocation.
154
188
 
155
189
  ### Optional execution restrictions
156
190
 
@@ -185,6 +219,20 @@ relaunches, cancels or rolls back the source chain. **Do not blindly rerun after
185
219
  ambiguous broadcast**: inspect the durable transaction hash on chain first.
186
220
  See [chain/API invariants](../docs/launch-lifecycle.md#individual-token-creation-examples).
187
221
 
222
+ After interruption, timeout, replacement or reorg, preserve the original identity,
223
+ final `plan.json`, selected mode, confirmation policy and every signed hash. Do not
224
+ deserialize diagnostic `planning.json` as a trusted `PlannedLaunch`, remine salts,
225
+ recalibrate buys or restart a wrapper. Reconstruct the exact saved commitment with
226
+ `planLaunch`, then use `readLaunchProgress` and fresh `buildNextTransaction` on the
227
+ intended source RPC. Supply receipt references including observed block number/hash;
228
+ when a replacement is known retain both `transactionHash` (original) and
229
+ `replacementHash` (effective). A same-nonce cancellation is not successful activation;
230
+ a missing receipt alone does not prove a reorg. No replacement is adopted or retried
231
+ automatically by these local-signing cases: a timed-out original hash requires manual
232
+ reconciliation. `launch.mjs` provides the unsigned reload/review path. Recovery of API
233
+ publication uses the original private session/capability and canonical activation
234
+ hash, never another launch.
235
+
188
236
  ### Owned-local wallet verification helpers
189
237
 
190
238
  `launch-example-support.mjs` exports
@@ -202,6 +250,48 @@ case objects as the eight files, loads environment and auto-creates its output.
202
250
  Offline diagnostic tests are in `test/launch-example.test.mjs`; they do not claim
203
251
  real launch or API-indexer proof.
204
252
 
253
+ ## Relationship to the application flows
254
+
255
+ The examples have been reviewed against `abyss-app`'s `scripts/launch-node.mjs`,
256
+ `launch-node-deploy.mjs`, `launch-browser-wallet.mjs`, `launch-staged-smoke.mjs`,
257
+ `launch-review-smoke.mjs`, and `src/lib/creation` / `src/lib/lifecycle` authoring,
258
+ funding, execution and recovery modules. These are behavioral references, not SDK
259
+ dependencies. That application's `black-market-sdk-0.7.0-local-20261007.tgz` pin and
260
+ October5 address literals are **not** current deployment authority. The mined graph
261
+ is recorded in the contracts repository at
262
+ `contracts/deployments/launch/pool-launch-v1/20261008T000141Z-e174ce6/manifest.json`;
263
+ examples resolve its SDK presets and certify live bindings, rather than copying
264
+ addresses from an application script.
265
+
266
+ | Flow | Shared contract / intentional difference |
267
+ | --- | --- |
268
+ | Eight fixed launch wrappers | Unified preparation/admission, explicit mode, exact allocations, immutable config6 max/min/sensitivity, protected ordered buys, reviewed next envelopes and canonical Active/custody verification. All eight remain independent no-argument cases. |
269
+ | App Node launch/deploy | Uses valuation-driven recipe positions and native-to-ERC20 conversion quotes. Fixed cases intentionally use one registered wrapped-native quote and `NativeWrap`; there is no conversion API, router calldata or quote-expiry dependency. |
270
+ | Browser wallet | Browser account/provider authority and explicit UI review are application-owned. The examples instead derive an EOA locally, hold one source/submission RPC, recheck chain before signing/sending, and preserve computed signed hashes before one raw send. A browser integration must bind the active account/provider/chain again after review and pass that provider's RPC adapter as `submissionClient`; read proof alone does not authorize wallet submission. |
271
+ | App creation funding | Native wrapping needs ETH value, not an ERC20 approval. Direct ERC20 funding needs balance/allowance to the **actual core-owned funding escrow**, not an arbitrary router/core. ERC20-input conversions additionally need registry-admitted inputs, a registered target/spender/runtime, exact receiver/calldata/minimum/precision, and a fresh unexpired quote. Use SDK prerequisites and fresh `approve-reset` / `approve` next steps; do not extend the fixed runner's native-only signing allowlist blindly. |
272
+ | App metadata/image | Fixed cases sign the same chain/core/wallet-bound attribution and stage metadata only: `image: null`, session `ready_to_launch`, no image upload claim. For a real image, hash the actual bytes, sign its descriptor, use `putImage` with the issued upload URL/headers, and `completeUpload` before launch. App legal consent, API catalogs and keystore handling are not generic SDK implementations to copy. |
273
+ | App publication/recovery | Pending HTTP 202 is not success. Fixed cases honor `LaunchPublishPending`/`Retry-After` within a bounded deadline and require ready metadata plus the indexed token/creator/activation DTO. The app's Query polling/UI, two-confirmation policy and replacement tracking are intentionally different from the fixed examples' one-confirmation, stop-and-reconcile local signer. |
274
+ | App review/staged smoke | These app scripts exercise read-only browser review and large matrices, not permission to deploy. SDK `quickstart.mjs` and `launch.mjs` remain read-only on the source chain. SDK `launch-lifecycle-smoke.mjs` is a different, explicitly authorized owned-loopback execution proof, including real ERC20 approval prerequisites when supplied by fixture plans. |
275
+ | Historical commitment generator | Retains original independent config4 bytes/hashes for codec regression evidence; no addresses or allocations in that vector should be used to construct the current graph. |
276
+
277
+ ### Safe verification without a funded launch
278
+
279
+ After rebuilding the package, run the ordinary offline suite (including
280
+ `test/launch-example.test.mjs`) and typecheck. The example tests retain endpoint,
281
+ chain/account, exact-signing, redaction, pre-broadcast durability, pending-publication
282
+ and no-retry behavior, plus residual-burn/no-creator-reserve accounting; they do not
283
+ claim an actual chain launch or indexer proof.
284
+
285
+ For CLI proof, run `node examples/launch.mjs` without required arguments (usage refusal,
286
+ no RPC/signing) and `node examples/generate-lifecycle-commitment-fixture.mjs` without
287
+ output paths (offline historical vector to stdout). Read-only deployed discovery is
288
+ `node examples/quickstart.mjs`. With a reviewed exact saved current plan, use
289
+ `launch.mjs --plan ... --rpc ... --mode ...` and retained receipt-reference JSON;
290
+ `--mine` performs only local mining and read-only native simulation on the source.
291
+ Do **not** run any of the eight configured wallet/API wrappers to verify this review.
292
+ Real metadata-session integration needs an owned disposable HTTP service; full custody,
293
+ receipt and fee execution proof needs the separately authorized owned fixture below.
294
+
205
295
 
206
296
  ## Actual owned-fixture proof
207
297