@black-market/sdk 0.4.0 → 0.5.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.
@@ -119,7 +119,6 @@ const v4AdapterMetadataAbi = [
119
119
  { type: "function", name: "CONFIG_VERSION", stateMutability: "view", inputs: [], outputs: [{ type: "uint32" }] },
120
120
  { type: "function", name: "implementationRegistry", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
121
121
  { type: "function", name: "poolManager", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
122
- { type: "function", name: "hookRoot", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
123
122
  { type: "function", name: "oracleFactory", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
124
123
  { type: "function", name: "locker", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
125
124
  { type: "function", name: "collectorFactory", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
@@ -127,6 +126,7 @@ const v4AdapterMetadataAbi = [
127
126
  ] as const;
128
127
  export const sharedMarketAdapterV1Abi = [
129
128
  ...v4AdapterMetadataAbi,
129
+ { type: "function", name: "hookRoot", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
130
130
  { type: "constructor", stateMutability: "nonpayable", inputs: [
131
131
  { name: "core_", type: "address" }, { name: "manager_", type: "address" }, { name: "root_", type: "address" },
132
132
  { name: "locker_", type: "address" }, { name: "helper_", type: "address" }, { name: "registry_", type: "address" },
@@ -142,6 +142,7 @@ export const abyssLifecycleAdapterAbi = [
142
142
  ] as const;
143
143
  export const poolMarketAdapterV1Abi = [
144
144
  ...v4AdapterMetadataAbi,
145
+ { type: "function", name: "hookRoot", stateMutability: "pure", inputs: [], outputs: [{ type: "address" }] },
145
146
  { type: "constructor", stateMutability: "nonpayable", inputs: [
146
147
  { name: "core_", type: "address" }, { name: "manager_", type: "address" }, { name: "oracleFactory_", type: "address" },
147
148
  { name: "locker_", type: "address" }, { name: "deployer_", type: "address" }, { name: "helper_", type: "address" },
@@ -205,17 +206,78 @@ export const lifecycleV4HookAbi = [
205
206
  { type: "function", name: "pendingFees", stateMutability: "view", inputs: [{ type: "bytes32" }, { type: "address" }], outputs: [{ type: "uint256" }] },
206
207
  { type: "function", name: "settledFees", stateMutability: "view", inputs: [{ type: "bytes32" }, { type: "address" }], outputs: [{ type: "uint256" }] },
207
208
  ] as const;
208
- export const poolBoundLaunchFeeHookV1Abi = [
209
- ...lifecycleV4HookAbi,
210
- { type: "constructor", stateMutability: "nonpayable", inputs: [boundParametersInput] },
211
- { type: "function", name: "boundPoolId", stateMutability: "view", inputs: [], outputs: [{ type: "bytes32" }] },
212
- { type: "function", name: "deploymentConfigHash", stateMutability: "view", inputs: [], outputs: [{ type: "bytes32" }] },
213
- { type: "function", name: "marketCommitment", stateMutability: "view", inputs: [], outputs: [{ type: "bytes32" }] },
214
- { type: "function", name: "core", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
215
- { type: "function", name: "liquidityLocker", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
216
- { type: "function", name: "token", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
217
- { type: "function", name: "openingSqrtPriceX96", stateMutability: "view", inputs: [], outputs: [{ type: "uint160" }] },
218
- { type: "function", name: "expectedPositionCount", stateMutability: "view", inputs: [], outputs: [{ type: "uint32" }] },
209
+ /** Complete mined FixedFeePoolHookV1 ABI (pool-launch-v1, 20261005T053747Z-b5a7b88).
210
+ * Compiler-only internalType annotations are omitted; the constructor is one 18-field tuple. */
211
+ export const fixedFeePoolHookV1Abi = [
212
+ { type: "constructor", inputs: [boundParametersInput], stateMutability: "nonpayable" },
213
+ { type: "function", name: "ALL_HOOK_MASK", inputs: [], outputs: [{ name: "", type: "uint160" }], stateMutability: "view" },
214
+ { type: "function", name: "MAX_ORACLE_CARDINALITY", inputs: [], outputs: [{ name: "", type: "uint16" }], stateMutability: "view" },
215
+ { type: "function", name: "PIPS_DENOMINATOR", inputs: [], outputs: [{ name: "", type: "uint24" }], stateMutability: "view" },
216
+ { type: "function", name: "REQUIRED_HOOK_FLAGS", inputs: [], outputs: [{ name: "", type: "uint160" }], stateMutability: "view" },
217
+ { type: "function", name: "afterDonate", inputs: [{ name: "", type: "address" }, { name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "", type: "uint256" }, { name: "", type: "uint256" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" },
218
+ { type: "function", name: "afterInitialize", inputs: [{ name: "sender", type: "address" }, { name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "sqrtPriceX96", type: "uint160" }, { name: "tick", type: "int24" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" },
219
+ { type: "function", name: "afterSwap", inputs: [{ name: "", type: "address" }, { name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "params", type: "tuple", components: [{ name: "zeroForOne", type: "bool" }, { name: "amountSpecified", type: "int256" }, { name: "sqrtPriceLimitX96", type: "uint160" }] }, { name: "delta", type: "int256" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }, { name: "", type: "int128" }], stateMutability: "nonpayable" },
220
+ { type: "function", name: "aggregateLiabilities", inputs: [{ name: "asset", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" },
221
+ { type: "function", name: "aggregateManagerClaims", inputs: [{ name: "asset", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" },
222
+ { type: "function", name: "beforeAddLiquidity", inputs: [{ name: "sender", type: "address" }, { name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "params", type: "tuple", components: [{ name: "tickLower", type: "int24" }, { name: "tickUpper", type: "int24" }, { name: "liquidityDelta", type: "int256" }, { name: "salt", type: "bytes32" }] }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" },
223
+ { type: "function", name: "beforeDonate", inputs: [{ name: "", type: "address" }, { name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "amount0", type: "uint256" }, { name: "amount1", type: "uint256" }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" },
224
+ { type: "function", name: "beforeRemoveLiquidity", inputs: [{ name: "sender", type: "address" }, { name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "params", type: "tuple", components: [{ name: "tickLower", type: "int24" }, { name: "tickUpper", type: "int24" }, { name: "liquidityDelta", type: "int256" }, { name: "salt", type: "bytes32" }] }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }], stateMutability: "nonpayable" },
225
+ { type: "function", name: "beforeSwap", inputs: [{ name: "", type: "address" }, { name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "params", type: "tuple", components: [{ name: "zeroForOne", type: "bool" }, { name: "amountSpecified", type: "int256" }, { name: "sqrtPriceLimitX96", type: "uint160" }] }, { name: "", type: "bytes" }], outputs: [{ name: "", type: "bytes4" }, { name: "", type: "int256" }, { name: "", type: "uint24" }], stateMutability: "nonpayable" },
226
+ { type: "function", name: "boundPoolId", inputs: [], outputs: [{ name: "", type: "bytes32" }], stateMutability: "view" },
227
+ { type: "function", name: "collectFees", inputs: [{ name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }], outputs: [{ name: "amount0", type: "uint256" }, { name: "amount1", type: "uint256" }], stateMutability: "nonpayable" },
228
+ { type: "function", name: "completePoolOpening", inputs: [{ name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }], outputs: [], stateMutability: "nonpayable" },
229
+ { type: "function", name: "core", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" },
230
+ { type: "function", name: "deploymentConfigHash", inputs: [], outputs: [{ name: "", type: "bytes32" }], stateMutability: "view" },
231
+ { type: "function", name: "expectedPositionCount", inputs: [], outputs: [{ name: "", type: "uint32" }], stateMutability: "view" },
232
+ { type: "function", name: "increaseObservationCardinalityNext", inputs: [{ name: "id", type: "bytes32" }, { name: "requested", type: "uint16" }], outputs: [], stateMutability: "nonpayable" },
233
+ { type: "function", name: "initialized", inputs: [{ name: "id", type: "bytes32" }], outputs: [{ name: "", type: "bool" }], stateMutability: "view" },
234
+ { type: "function", name: "liquidityLocker", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" },
235
+ { type: "function", name: "marketCommitment", inputs: [], outputs: [{ name: "", type: "bytes32" }], stateMutability: "view" },
236
+ { type: "function", name: "observations", inputs: [{ name: "id", type: "bytes32" }, { name: "index", type: "uint256" }], outputs: [{ name: "blockTimestamp", type: "uint32" }, { name: "tickCumulative", type: "int56" }, { name: "secondsPerLiquidityCumulativeX128", type: "uint160" }, { name: "observationInitialized", type: "bool" }], stateMutability: "view" },
237
+ { type: "function", name: "observeTruncated", inputs: [{ name: "id", type: "bytes32" }, { name: "secondsAgos", type: "uint32[]" }], outputs: [{ name: "tickCumulatives", type: "int56[]" }, { name: "secondsPerLiquidityCumulativeX128s", type: "uint160[]" }], stateMutability: "view" },
238
+ { type: "function", name: "openingCompletedAt", inputs: [{ name: "id", type: "bytes32" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" },
239
+ { type: "function", name: "openingSqrtPriceX96", inputs: [], outputs: [{ name: "", type: "uint160" }], stateMutability: "view" },
240
+ { type: "function", name: "oracleFactory", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" },
241
+ { type: "function", name: "oracleInitializedAt", inputs: [{ name: "id", type: "bytes32" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" },
242
+ { type: "function", name: "oracleState", inputs: [{ name: "id", type: "bytes32" }], outputs: [{ name: "index", type: "uint16" }, { name: "cardinality", type: "uint16" }, { name: "cardinalityNext", type: "uint16" }, { name: "tick", type: "int24" }, { name: "lastBlock", type: "uint64" }, { name: "initializedAt", type: "uint64" }, { name: "maxAbsTickMove", type: "int24" }, { name: "cardinalityCap", type: "uint16" }], stateMutability: "view" },
243
+ { type: "function", name: "pendingFees", inputs: [{ name: "id", type: "bytes32" }, { name: "asset", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" },
244
+ { type: "function", name: "pendingTreasurySweeps", inputs: [{ name: "id", type: "bytes32" }, { name: "asset", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" },
245
+ { type: "function", name: "poolConfig", inputs: [{ name: "id", type: "bytes32" }], outputs: [{ name: "", type: "tuple", components: lifecycleV4HookPoolConfigComponents }], stateMutability: "view" },
246
+ { type: "function", name: "poolKey", inputs: [{ name: "id", type: "bytes32" }], outputs: [{ name: "", type: "tuple", components: lifecycleV4PoolKeyComponents }], stateMutability: "view" },
247
+ { type: "function", name: "poolManager", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" },
248
+ { type: "function", name: "pools", inputs: [], outputs: [{ name: "ids", type: "bytes32[]" }], stateMutability: "view" },
249
+ { type: "function", name: "registerPool", inputs: [{ name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "config", type: "tuple", components: lifecycleV4HookPoolConfigComponents }], outputs: [], stateMutability: "nonpayable" },
250
+ { type: "function", name: "registered", inputs: [{ name: "id", type: "bytes32" }], outputs: [{ name: "", type: "bool" }], stateMutability: "view" },
251
+ { type: "function", name: "registrar", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" },
252
+ { type: "function", name: "settledFees", inputs: [{ name: "id", type: "bytes32" }, { name: "asset", type: "address" }], outputs: [{ name: "", type: "uint256" }], stateMutability: "view" },
253
+ { type: "function", name: "token", inputs: [], outputs: [{ name: "", type: "address" }], stateMutability: "view" },
254
+ { type: "function", name: "unlockCallback", inputs: [{ name: "data", type: "bytes" }], outputs: [{ name: "", type: "bytes" }], stateMutability: "nonpayable" },
255
+ { type: "function", name: "validateCollector", inputs: [{ name: "key", type: "tuple", components: lifecycleV4PoolKeyComponents }, { name: "collector", type: "address" }, { name: "locker", type: "address" }], outputs: [], stateMutability: "view" },
256
+ { type: "function", name: "validateOracleConfig", inputs: [{ name: "oracleConfigId", type: "bytes32" }], outputs: [{ name: "maxAbsTickMove", type: "uint24" }, { name: "cardinality", type: "uint16" }], stateMutability: "view" },
257
+ { type: "event", name: "FeeAccrued", inputs: [{ name: "poolId", type: "bytes32", indexed: true }, { name: "asset", type: "address", indexed: true }, { name: "gross", type: "uint256", indexed: false }, { name: "treasury", type: "uint256", indexed: false }], anonymous: false },
258
+ { type: "event", name: "FeesCollected", inputs: [{ name: "poolId", type: "bytes32", indexed: true }, { name: "collector", type: "address", indexed: true }, { name: "amount0", type: "uint256", indexed: false }, { name: "amount1", type: "uint256", indexed: false }], anonymous: false },
259
+ { type: "event", name: "IncreaseObservationCardinalityNext", inputs: [{ name: "poolId", type: "bytes32", indexed: true }, { name: "cardinalityNextOld", type: "uint16", indexed: false }, { name: "cardinalityNextNew", type: "uint16", indexed: false }], anonymous: false },
260
+ { type: "event", name: "LpFeesCheckpointed", inputs: [{ name: "poolId", type: "bytes32", indexed: true }, { name: "locker", type: "address", indexed: true }, { name: "amount0", type: "uint256", indexed: false }, { name: "amount1", type: "uint256", indexed: false }], anonymous: false },
261
+ { type: "event", name: "OpeningCompleted", inputs: [{ name: "poolId", type: "bytes32", indexed: true }, { name: "completedAt", type: "uint256", indexed: true }], anonymous: false },
262
+ { type: "event", name: "PoolInitialized", inputs: [{ name: "poolId", type: "bytes32", indexed: true }], anonymous: false },
263
+ { type: "event", name: "PoolRegistered", inputs: [{ name: "poolId", type: "bytes32", indexed: true }, { name: "collector", type: "address", indexed: true }, { name: "locker", type: "address", indexed: true }], anonymous: false },
264
+ { type: "error", name: "AlreadyRegistered", inputs: [] },
265
+ { type: "error", name: "ClaimMismatch", inputs: [] },
266
+ { type: "error", name: "ExternalLiquidityDisabled", inputs: [] },
267
+ { type: "error", name: "FeeSettlementRequired", inputs: [] },
268
+ { type: "error", name: "FeeTooLarge", inputs: [] },
269
+ { type: "error", name: "IncompleteFill", inputs: [] },
270
+ { type: "error", name: "InexactTransfer", inputs: [] },
271
+ { type: "error", name: "InvalidCallback", inputs: [] },
272
+ { type: "error", name: "InvalidConfiguration", inputs: [] },
273
+ { type: "error", name: "InvalidHookAddress", inputs: [] },
274
+ { type: "error", name: "InvalidObservationState", inputs: [] },
275
+ { type: "error", name: "InvalidPool", inputs: [] },
276
+ { type: "error", name: "ObservationTooOld", inputs: [] },
277
+ { type: "error", name: "OpeningAlreadyComplete", inputs: [] },
278
+ { type: "error", name: "OpeningNotComplete", inputs: [] },
279
+ { type: "error", name: "Reentrancy", inputs: [] },
280
+ { type: "error", name: "Unauthorized", inputs: [] },
219
281
  ] as const;
220
282
  export const lifecycleV4LockerAbi = [
221
283
  { type: "function", name: "poolManager", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
@@ -249,6 +311,39 @@ export const lifecycleErc20Abi = [
249
311
  { type: "function", name: "allowance", stateMutability: "view", inputs: [{ type: "address" }, { type: "address" }], outputs: [{ type: "uint256" }] },
250
312
  { type: "function", name: "approve", stateMutability: "nonpayable", inputs: [{ type: "address" }, { type: "uint256" }], outputs: [{ type: "bool" }] },
251
313
  ] as const;
314
+ /** Shared immutable bindings and terminal state of LaunchERC20V1 / LaunchERC404V1. */
315
+ export const lifecycleTokenContextAbi = [
316
+ { type: "function", name: "authority", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
317
+ { type: "function", name: "tokenFactory", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
318
+ { type: "function", name: "launchId", stateMutability: "view", inputs: [], outputs: [{ type: "bytes32" }] },
319
+ { type: "function", name: "rewardMode", stateMutability: "view", inputs: [], outputs: [{ type: "uint8" }] },
320
+ { type: "function", name: "initialSupply", stateMutability: "view", inputs: [], outputs: [{ type: "uint256" }] },
321
+ { type: "function", name: "burnOnCancel", stateMutability: "view", inputs: [], outputs: [{ type: "bool" }] },
322
+ { type: "function", name: "active", stateMutability: "view", inputs: [], outputs: [{ type: "bool" }] },
323
+ { type: "function", name: "cancelled", stateMutability: "view", inputs: [], outputs: [{ type: "bool" }] },
324
+ { type: "function", name: "exclusionsFinalized", stateMutability: "view", inputs: [], outputs: [{ type: "bool" }] },
325
+ { type: "function", name: "feeHub", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
326
+ { type: "function", name: "rewardModule", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
327
+ ] as const;
328
+ export const lifecycleErc404Abi = [
329
+ ...lifecycleTokenContextAbi,
330
+ { type: "function", name: "unit", stateMutability: "view", inputs: [], outputs: [{ type: "uint256" }] },
331
+ { type: "function", name: "baseURI", stateMutability: "view", inputs: [], outputs: [{ type: "string" }] },
332
+ { type: "function", name: "mirrorERC721", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
333
+ ] as const;
334
+ export const lifecycleErc404MirrorAbi = [
335
+ { type: "function", name: "baseERC20", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
336
+ ] as const;
337
+ export const lifecycleTokenFactoryAbi = [
338
+ { type: "function", name: "core", stateMutability: "view", inputs: [], outputs: [{ type: "address" }] },
339
+ { type: "function", name: "tokenOfLaunch", stateMutability: "view", inputs: [{ type: "bytes32" }], outputs: [{ type: "address" }] },
340
+ { type: "function", name: "launchOfToken", stateMutability: "view", inputs: [{ type: "address" }], outputs: [{ type: "bytes32" }] },
341
+ { type: "event", name: "TokenDeployed", anonymous: false, inputs: [
342
+ { name: "launchId", type: "bytes32", indexed: true }, { name: "token", type: "address", indexed: true },
343
+ { name: "kind", type: "uint8", indexed: false },
344
+ ] },
345
+ ] as const;
346
+
252
347
  export const lifecycleOracleFactoryAbi = [
253
348
  { type: "function", name: "oracleConfigs", stateMutability: "view", inputs: [{ type: "bytes32" }], outputs: [{ type: "uint24" }, { type: "uint16" }] },
254
349
  ] as const;
@@ -1,5 +1,5 @@
1
1
  import { concatHex, decodeFunctionData, encodeAbiParameters, encodeFunctionData, keccak256, stringToHex, toHex, zeroAddress, zeroHash, type Address, type Hash, type Hex } from "viem";
2
- import { abyssLifecycleAdapterAbi, launchLifecycleAbi, lifecycleAdapterAbi, lifecycleDirectoryAbi, lifecycleErc20Abi, lifecycleOracleFactoryAbi, lifecycleRegistryAbi, poolFeeCollectorFactoryV1Abi, lifecycleV4HookAbi, lifecycleV4LockerAbi, poolHookDeployerV1Abi, sharedHookDeployerV1Abi, poolBoundLaunchFeeHookV1Abi, poolMarketAdapterV1Abi, sharedMarketAdapterV1Abi } from "./abi.js";
2
+ import { abyssLifecycleAdapterAbi, launchLifecycleAbi, lifecycleAdapterAbi, lifecycleDirectoryAbi, lifecycleErc20Abi, lifecycleOracleFactoryAbi, lifecycleRegistryAbi, poolFeeCollectorFactoryV1Abi, lifecycleV4HookAbi, lifecycleV4LockerAbi, poolHookDeployerV1Abi, sharedHookDeployerV1Abi, fixedFeePoolHookV1Abi, poolMarketAdapterV1Abi, sharedMarketAdapterV1Abi } from "./abi.js";
3
3
  import { decodePoolBoundV4LifecycleMarketConfig, encodePoolBoundHookParameters, hasLifecycleV4HookPermissions, hashPoolBoundV4MarketCommitment, poolBoundHookInitCodeHash, predictPoolBoundHookAddress, validateV4LifecycleMarket, V4_LIFECYCLE_CONFIG_SCHEMA, V4_POOL_BOUND_LIFECYCLE_CONFIG_SCHEMA, type PoolBoundHookParametersV1 } from "./markets.js";
4
4
  import { hashLaunchIdentity, hashLaunchPlan, hashLaunchBounds, hashLaunchDependencies, hashLifecycleProfile, launchProgressV1Components, LifecycleMode, LifecyclePhase, LifecycleVenue, LIFECYCLE_REQUIRED_CAPABILITIES, LIFECYCLE_ERC404_CAPABILITY, LIFECYCLE_MULTI_POSITION_CAPABILITY, type AdapterRegistrationV1, type LaunchPlanV1, type LaunchProgressV1, type MarketIdentityV1, type MarketLiveStateV1, type PreparedMarketV1, type ProfileRegistrationV1, type ProfileTopologyV1, type LaunchEnvelopeV2, type LifecycleDeveloperTerms } from "./schema.js";
5
5
  import { assertLifecycleBlock, lifecycleRpc, readLifecycleBlock, readLifecycleContract, readLifecycleProfileTopology, rpcHex, rpcObject, rpcQuantity } from "./rpc.js";
@@ -214,18 +214,18 @@ async function readPoolBoundHookDeploymentDetails(options: { client: LifecycleRp
214
214
  ["poolManager", expected.poolManager], ["registrar", expected.registrar], ["oracleFactory", expected.oracleFactory],
215
215
  ["core", expected.core], ["liquidityLocker", expected.liquidityLocker], ["token", expected.token],
216
216
  ] as const) {
217
- const actual = await readLifecycleContract<Address>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, getter, [], block);
217
+ const actual = await readLifecycleContract<Address>(client, predictedHook, fixedFeePoolHookV1Abi, getter, [], block);
218
218
  if (actual.toLowerCase() !== expectedAddress.toLowerCase()) throw new LifecyclePlanningError("HOOK_DEPLOYMENT_CHANGED", "Existing hook immutable dependency graph differs from the committed constructor");
219
219
  }
220
- if (await readLifecycleContract<bigint>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, "REQUIRED_HOOK_FLAGS", [], block) !== 0x1afcn ||
221
- await readLifecycleContract<bigint>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, "ALL_HOOK_MASK", [], block) !== 0x3fffn) throw new LifecyclePlanningError("HOOK_DEPLOYMENT_CHANGED", "Existing bound hook callback declarations differ from the reviewed envelope");
220
+ if (await readLifecycleContract<bigint>(client, predictedHook, fixedFeePoolHookV1Abi, "REQUIRED_HOOK_FLAGS", [], block) !== 0x1afcn ||
221
+ await readLifecycleContract<bigint>(client, predictedHook, fixedFeePoolHookV1Abi, "ALL_HOOK_MASK", [], block) !== 0x3fffn) throw new LifecyclePlanningError("HOOK_DEPLOYMENT_CHANGED", "Existing bound hook callback declarations differ from the reviewed envelope");
222
222
  const [currency0, currency1] = BigInt(token) < BigInt(market.quoteAsset) ? [token, market.quoteAsset] : [market.quoteAsset, token];
223
223
  const expectedPoolId = keccak256(encodeAbiParameters([{ type: "address" }, { type: "address" }, { type: "uint24" }, { type: "int24" }, { type: "address" }], [currency0, currency1, config.lpFeePips, config.tickSpacing, predictedHook]));
224
- const actualPoolId = await readLifecycleContract<Hex>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, "boundPoolId", [], block);
225
- const deploymentConfigHash = await readLifecycleContract<Hex>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, "deploymentConfigHash", [], block);
226
- const marketCommitment = await readLifecycleContract<Hex>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, "marketCommitment", [], block);
227
- const opening = await readLifecycleContract<bigint>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, "openingSqrtPriceX96", [], block);
228
- const positions = await readLifecycleContract<number>(client, predictedHook, poolBoundLaunchFeeHookV1Abi, "expectedPositionCount", [], block);
224
+ const actualPoolId = await readLifecycleContract<Hex>(client, predictedHook, fixedFeePoolHookV1Abi, "boundPoolId", [], block);
225
+ const deploymentConfigHash = await readLifecycleContract<Hex>(client, predictedHook, fixedFeePoolHookV1Abi, "deploymentConfigHash", [], block);
226
+ const marketCommitment = await readLifecycleContract<Hex>(client, predictedHook, fixedFeePoolHookV1Abi, "marketCommitment", [], block);
227
+ const opening = await readLifecycleContract<bigint>(client, predictedHook, fixedFeePoolHookV1Abi, "openingSqrtPriceX96", [], block);
228
+ const positions = await readLifecycleContract<number>(client, predictedHook, fixedFeePoolHookV1Abi, "expectedPositionCount", [], block);
229
229
  if (actualPoolId.toLowerCase() !== expectedPoolId.toLowerCase() || deploymentConfigHash.toLowerCase() !== keccak256(encodePoolBoundHookParameters(expected)).toLowerCase() || marketCommitment.toLowerCase() !== expected.marketCommitment.toLowerCase() || opening !== expected.sqrtPriceX96 || positions !== expected.expectedPositionCount) throw new LifecyclePlanningError("HOOK_DEPLOYMENT_CHANGED", "Existing hook key, economic commitment or immutable opening geometry changed");
230
230
  }
231
231
  return { deployment: { deployer, initCodeHash, salt, predictedHook }, parameters: expected };
@@ -179,10 +179,9 @@ export const LIFECYCLE_PERMANENT_CUSTODY_CAPABILITY = 8n;
179
179
  export const LIFECYCLE_CANONICAL_FEES_CAPABILITY = 16n;
180
180
  export const LIFECYCLE_ERC404_CAPABILITY = 32n;
181
181
  export const LIFECYCLE_MULTI_POSITION_CAPABILITY = 64n;
182
- /** TOKEN_ONLY|EMPTY_PREPARE|PERMANENT_CUSTODY|CANONICAL_FEES. The retired POOL_GATE bit
183
- * is never requested: preactivation safety is token transfer restrictions plus the
184
- * activation-time canonical opening-state verification on both canonical venues. Atomic
185
- * and staged share this mask; mode changes execution grouping, never venue eligibility. */
182
+ /** TOKEN_ONLY|EMPTY_PREPARE|PERMANENT_CUSTODY|CANONICAL_FEES. Preactivation safety
183
+ * uses token transfer restrictions and activation-time canonical opening-state
184
+ * verification on both venues. Atomic and staged share this capability mask. */
186
185
  export const LIFECYCLE_REQUIRED_CAPABILITIES = LIFECYCLE_TOKEN_ONLY_CAPABILITY | LIFECYCLE_EMPTY_PREPARE_CAPABILITY | LIFECYCLE_PERMANENT_CUSTODY_CAPABILITY | LIFECYCLE_CANONICAL_FEES_CAPABILITY;
187
186
  export const LIFECYCLE_MAX_ERC20_SUPPLY = (1n << 256n) - 1n;
188
187
  export const LIFECYCLE_MAX_REWARD_ERC20_SUPPLY = 10n ** 77n;