@whetstone-research/doppler-sdk 0.0.22 → 0.0.24
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 +553 -221
- package/dist/DopplerSDK.d.mts +12 -0
- package/dist/DopplerSDK.d.ts +12 -0
- package/dist/DopplerSDK.js +29 -26
- package/dist/DopplerSDK.mjs +28 -25
- package/dist/abis/bytecodes/derc20.js +2 -2
- package/dist/abis/bytecodes/derc20.mjs +1 -1
- package/dist/abis/bytecodes/derc2080.js +2 -2
- package/dist/abis/bytecodes/derc2080.mjs +1 -1
- package/dist/abis/bytecodes/doppler.js +2 -2
- package/dist/abis/bytecodes/doppler.mjs +1 -1
- package/dist/abis/bytecodes/dopplerDN404.js +2 -2
- package/dist/abis/bytecodes/dopplerDN404.mjs +1 -1
- package/dist/abis/bytecodes/stateView.js +2 -2
- package/dist/abis/bytecodes/stateView.mjs +1 -1
- package/dist/abis/bytecodes.js +10 -10
- package/dist/abis/bytecodes.mjs +5 -5
- package/dist/abis/index.d.mts +421 -10
- package/dist/abis/index.d.ts +421 -10
- package/dist/abis/index.js +41 -33
- package/dist/abis/index.mjs +6 -6
- package/dist/addresses.d.mts +6 -0
- package/dist/addresses.d.ts +6 -0
- package/dist/addresses.js +7 -7
- package/dist/addresses.mjs +2 -2
- package/dist/builders/DynamicAuctionBuilder.d.mts +2 -0
- package/dist/builders/DynamicAuctionBuilder.d.ts +2 -0
- package/dist/builders/DynamicAuctionBuilder.js +17 -16
- package/dist/builders/DynamicAuctionBuilder.mjs +16 -15
- package/dist/builders/MulticurveBuilder.d.mts +18 -5
- package/dist/builders/MulticurveBuilder.d.ts +18 -5
- package/dist/builders/MulticurveBuilder.js +17 -16
- package/dist/builders/MulticurveBuilder.mjs +16 -15
- package/dist/builders/StaticAuctionBuilder.js +17 -16
- package/dist/builders/StaticAuctionBuilder.mjs +16 -15
- package/dist/builders/index.js +25 -24
- package/dist/builders/index.mjs +18 -17
- package/dist/builders/shared.d.mts +1 -1
- package/dist/builders/shared.d.ts +1 -1
- package/dist/builders/shared.js +19 -17
- package/dist/builders/shared.mjs +15 -13
- package/dist/{chunk-3XYDN2XB.js → chunk-2A3B3NVB.js} +170 -25
- package/dist/chunk-2A3B3NVB.js.map +1 -0
- package/dist/{chunk-AZOBEWP3.mjs → chunk-3NMGCQJ4.mjs} +2 -2
- package/dist/chunk-3NMGCQJ4.mjs.map +1 -0
- package/dist/{chunk-CUB4F546.js → chunk-44CYUEPG.js} +25 -13
- package/dist/chunk-44CYUEPG.js.map +1 -0
- package/dist/{chunk-AZH2P4JK.mjs → chunk-5GQJRNFL.mjs} +3 -3
- package/dist/{chunk-AZH2P4JK.mjs.map → chunk-5GQJRNFL.mjs.map} +1 -1
- package/dist/{chunk-ZDTJ3BPS.js → chunk-5JHXBDZD.js} +20 -20
- package/dist/{chunk-ZDTJ3BPS.js.map → chunk-5JHXBDZD.js.map} +1 -1
- package/dist/{chunk-OGYWNJGI.js → chunk-5TQOT6CW.js} +2 -2
- package/dist/chunk-5TQOT6CW.js.map +1 -0
- package/dist/{chunk-COOVGAOE.js → chunk-65CESA3J.js} +19 -13
- package/dist/chunk-65CESA3J.js.map +1 -0
- package/dist/{chunk-5VV7STYK.js → chunk-7A4DBBXA.js} +141 -101
- package/dist/chunk-7A4DBBXA.js.map +1 -0
- package/dist/chunk-7ZUV6WPX.mjs +3 -0
- package/dist/{chunk-5TL5V6UX.mjs.map → chunk-7ZUV6WPX.mjs.map} +1 -1
- package/dist/{chunk-RXUJ4DUB.js → chunk-A2CJYRRQ.js} +28 -28
- package/dist/{chunk-RXUJ4DUB.js.map → chunk-A2CJYRRQ.js.map} +1 -1
- package/dist/{chunk-QQEOKYEX.js → chunk-BK3S6SVR.js} +383 -83
- package/dist/chunk-BK3S6SVR.js.map +1 -0
- package/dist/{chunk-S4IZ5ATO.js → chunk-BQZTELUX.js} +5 -5
- package/dist/{chunk-S4IZ5ATO.js.map → chunk-BQZTELUX.js.map} +1 -1
- package/dist/{chunk-WKKOBMXR.js → chunk-CFXXUZJY.js} +57 -22
- package/dist/chunk-CFXXUZJY.js.map +1 -0
- package/dist/chunk-DCWF3EMP.js +171 -0
- package/dist/chunk-DCWF3EMP.js.map +1 -0
- package/dist/{chunk-YWK6YH6M.mjs → chunk-DQJXCZU2.mjs} +5 -5
- package/dist/{chunk-YWK6YH6M.mjs.map → chunk-DQJXCZU2.mjs.map} +1 -1
- package/dist/chunk-DSYPZETD.js +4 -0
- package/dist/{chunk-3PNCB4W5.js.map → chunk-DSYPZETD.js.map} +1 -1
- package/dist/chunk-F2BYG63D.mjs +145 -0
- package/dist/chunk-F2BYG63D.mjs.map +1 -0
- package/dist/{chunk-N33R22A2.js → chunk-FNUBKONK.js} +2 -2
- package/dist/{chunk-N33R22A2.js.map → chunk-FNUBKONK.js.map} +1 -1
- package/dist/chunk-FXTGIKQG.mjs +3 -0
- package/dist/{chunk-SD7BHT2F.mjs.map → chunk-FXTGIKQG.mjs.map} +1 -1
- package/dist/{chunk-MQNSJCAW.mjs → chunk-GSBQIVME.mjs} +2 -2
- package/dist/{chunk-MQNSJCAW.mjs.map → chunk-GSBQIVME.mjs.map} +1 -1
- package/dist/{chunk-SAX7P3MH.js → chunk-HJFVRV47.js} +2 -2
- package/dist/{chunk-SAX7P3MH.js.map → chunk-HJFVRV47.js.map} +1 -1
- package/dist/chunk-IIM2CSDQ.js +147 -0
- package/dist/chunk-IIM2CSDQ.js.map +1 -0
- package/dist/{chunk-O3RH43H3.mjs → chunk-IUTIHSLH.mjs} +4 -4
- package/dist/{chunk-O3RH43H3.mjs.map → chunk-IUTIHSLH.mjs.map} +1 -1
- package/dist/chunk-IUZ3BBQP.mjs +117 -0
- package/dist/chunk-IUZ3BBQP.mjs.map +1 -0
- package/dist/{chunk-D7PCIMWU.mjs → chunk-IX4V4UGW.mjs} +4 -4
- package/dist/{chunk-D7PCIMWU.mjs.map → chunk-IX4V4UGW.mjs.map} +1 -1
- package/dist/{chunk-2ZM4JVFC.js → chunk-J62YDWIK.js} +2 -2
- package/dist/chunk-J62YDWIK.js.map +1 -0
- package/dist/{chunk-E2NF4AQB.mjs → chunk-JLUOFAE4.mjs} +272 -12
- package/dist/chunk-JLUOFAE4.mjs.map +1 -0
- package/dist/{chunk-KITPRKQ4.mjs → chunk-LW3CYA27.mjs} +351 -51
- package/dist/chunk-LW3CYA27.mjs.map +1 -0
- package/dist/{chunk-3L4DLMOK.js → chunk-MEA2C5YX.js} +16 -16
- package/dist/{chunk-3L4DLMOK.js.map → chunk-MEA2C5YX.js.map} +1 -1
- package/dist/{chunk-3MVW6UIW.js → chunk-MU56HCUI.js} +273 -11
- package/dist/chunk-MU56HCUI.js.map +1 -0
- package/dist/chunk-OCIY7QEJ.mjs +169 -0
- package/dist/chunk-OCIY7QEJ.mjs.map +1 -0
- package/dist/{chunk-WDSV4O6T.mjs → chunk-OHA5KJ2M.mjs} +2 -2
- package/dist/chunk-OHA5KJ2M.mjs.map +1 -0
- package/dist/{chunk-MT34O3YL.js → chunk-P563HTVU.js} +50 -26
- package/dist/chunk-P563HTVU.js.map +1 -0
- package/dist/{chunk-RLUMYHPI.js → chunk-PGYTMRP3.js} +46 -18
- package/dist/chunk-PGYTMRP3.js.map +1 -0
- package/dist/{chunk-VGOEXLQ2.js → chunk-QAPQGDWK.js} +2 -2
- package/dist/chunk-QAPQGDWK.js.map +1 -0
- package/dist/{chunk-QOGBOT2M.mjs → chunk-QHBKRUBY.mjs} +3 -3
- package/dist/{chunk-QOGBOT2M.mjs.map → chunk-QHBKRUBY.mjs.map} +1 -1
- package/dist/chunk-QOYI7WCH.js +120 -0
- package/dist/chunk-QOYI7WCH.js.map +1 -0
- package/dist/{chunk-OF7BIKXV.js → chunk-QRTABC4Z.js} +2 -2
- package/dist/chunk-QRTABC4Z.js.map +1 -0
- package/dist/{chunk-CS6FVODR.mjs → chunk-QUBD6HUZ.mjs} +163 -18
- package/dist/chunk-QUBD6HUZ.mjs.map +1 -0
- package/dist/{chunk-RWVNXU7Z.mjs → chunk-RDTIXP6S.mjs} +4 -4
- package/dist/{chunk-RWVNXU7Z.mjs.map → chunk-RDTIXP6S.mjs.map} +1 -1
- package/dist/{chunk-5WYXNWNH.js → chunk-RLOZWHRR.js} +11 -11
- package/dist/{chunk-5WYXNWNH.js.map → chunk-RLOZWHRR.js.map} +1 -1
- package/dist/{chunk-VK5HAWX6.mjs → chunk-SWWLOD7Q.mjs} +2 -2
- package/dist/chunk-SWWLOD7Q.mjs.map +1 -0
- package/dist/chunk-T3UA4MJL.js +4 -0
- package/dist/{chunk-WTS75RUC.js.map → chunk-T3UA4MJL.js.map} +1 -1
- package/dist/{chunk-HJ4AS5DZ.mjs → chunk-TEWAXP5C.mjs} +36 -12
- package/dist/chunk-TEWAXP5C.mjs.map +1 -0
- package/dist/{chunk-ZRNPHFP3.mjs → chunk-THEIRDGE.mjs} +50 -15
- package/dist/chunk-THEIRDGE.mjs.map +1 -0
- package/dist/{chunk-LPA32BIK.mjs → chunk-U3GOWK6J.mjs} +2 -2
- package/dist/chunk-U3GOWK6J.mjs.map +1 -0
- package/dist/{chunk-QFQXHDC7.mjs → chunk-VKSD3KXF.mjs} +46 -18
- package/dist/chunk-VKSD3KXF.mjs.map +1 -0
- package/dist/{chunk-64ZQRKG3.mjs → chunk-VYSOAGRU.mjs} +2 -2
- package/dist/chunk-VYSOAGRU.mjs.map +1 -0
- package/dist/{chunk-ADAAU4F5.mjs → chunk-WDC53TM7.mjs} +49 -9
- package/dist/chunk-WDC53TM7.mjs.map +1 -0
- package/dist/{chunk-M2EMKIP5.mjs → chunk-WKWP42TD.mjs} +9 -4
- package/dist/chunk-WKWP42TD.mjs.map +1 -0
- package/dist/{chunk-OROTK4OT.js → chunk-WNUB3UTT.js} +12 -12
- package/dist/chunk-WNUB3UTT.js.map +1 -0
- package/dist/{chunk-FVTTG72Z.mjs → chunk-WNWK2QMU.mjs} +19 -7
- package/dist/chunk-WNWK2QMU.mjs.map +1 -0
- package/dist/{chunk-INLXNN7P.js → chunk-WZF5XNBC.js} +26 -26
- package/dist/{chunk-INLXNN7P.js.map → chunk-WZF5XNBC.js.map} +1 -1
- package/dist/{chunk-SMTHFPBA.js → chunk-XMFOZYNI.js} +2 -2
- package/dist/chunk-XMFOZYNI.js.map +1 -0
- package/dist/{chunk-VGCXJRUV.mjs → chunk-YBK6EBA5.mjs} +10 -10
- package/dist/chunk-YBK6EBA5.mjs.map +1 -0
- package/dist/{chunk-HH7HQ4HC.mjs → chunk-ZEDJUNC6.mjs} +2 -2
- package/dist/{chunk-HH7HQ4HC.mjs.map → chunk-ZEDJUNC6.mjs.map} +1 -1
- package/dist/deployments.generated.d.mts +44 -16
- package/dist/deployments.generated.d.ts +44 -16
- package/dist/deployments.generated.js +2 -2
- package/dist/deployments.generated.mjs +1 -1
- package/dist/entities/DopplerFactory.d.mts +7 -1
- package/dist/entities/DopplerFactory.d.ts +7 -1
- package/dist/entities/DopplerFactory.js +16 -14
- package/dist/entities/DopplerFactory.mjs +15 -13
- package/dist/entities/auction/DynamicAuction.js +10 -10
- package/dist/entities/auction/DynamicAuction.mjs +9 -9
- package/dist/entities/auction/MulticurvePool.d.mts +6 -2
- package/dist/entities/auction/MulticurvePool.d.ts +6 -2
- package/dist/entities/auction/MulticurvePool.js +11 -11
- package/dist/entities/auction/MulticurvePool.mjs +10 -10
- package/dist/entities/auction/RehypeDopplerHook.d.mts +57 -0
- package/dist/entities/auction/RehypeDopplerHook.d.ts +57 -0
- package/dist/entities/auction/RehypeDopplerHook.js +34 -0
- package/dist/entities/auction/RehypeDopplerHook.js.map +1 -0
- package/dist/entities/auction/RehypeDopplerHook.mjs +25 -0
- package/dist/entities/auction/RehypeDopplerHook.mjs.map +1 -0
- package/dist/entities/auction/RehypeDopplerHookMigrator.d.mts +48 -0
- package/dist/entities/auction/RehypeDopplerHookMigrator.d.ts +48 -0
- package/dist/entities/auction/RehypeDopplerHookMigrator.js +34 -0
- package/dist/entities/auction/RehypeDopplerHookMigrator.js.map +1 -0
- package/dist/entities/auction/RehypeDopplerHookMigrator.mjs +25 -0
- package/dist/entities/auction/RehypeDopplerHookMigrator.mjs.map +1 -0
- package/dist/entities/auction/StaticAuction.js +10 -10
- package/dist/entities/auction/StaticAuction.mjs +9 -9
- package/dist/entities/auction/index.d.mts +2 -0
- package/dist/entities/auction/index.d.ts +2 -0
- package/dist/entities/auction/index.js +38 -18
- package/dist/entities/auction/index.mjs +25 -13
- package/dist/entities/quoter/Quoter.js +10 -10
- package/dist/entities/quoter/Quoter.mjs +9 -9
- package/dist/entities/quoter/index.js +10 -10
- package/dist/entities/quoter/index.mjs +9 -9
- package/dist/entities/token/derc20/Derc20.js +8 -8
- package/dist/entities/token/derc20/Derc20.mjs +7 -7
- package/dist/entities/token/derc20/index.js +8 -8
- package/dist/entities/token/derc20/index.mjs +7 -7
- package/dist/entities/token/index.js +11 -11
- package/dist/entities/token/index.mjs +7 -7
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +120 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -25
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.mts +90 -7
- package/dist/types.d.ts +90 -7
- package/dist/types.js +12 -8
- package/dist/types.mjs +3 -3
- package/dist/utils/airlock.js +7 -7
- package/dist/utils/airlock.mjs +3 -3
- package/dist/utils/dopplerHookMigrator.d.mts +18 -0
- package/dist/utils/dopplerHookMigrator.d.ts +18 -0
- package/dist/utils/dopplerHookMigrator.js +20 -0
- package/dist/utils/dopplerHookMigrator.js.map +1 -0
- package/dist/utils/dopplerHookMigrator.mjs +7 -0
- package/dist/utils/dopplerHookMigrator.mjs.map +1 -0
- package/dist/utils/index.d.mts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +39 -32
- package/dist/utils/index.mjs +15 -12
- package/dist/utils/marketCapHelpers.js +13 -13
- package/dist/utils/marketCapHelpers.mjs +1 -1
- package/dist/utils/tokenAddressMiner.js +8 -8
- package/dist/utils/tokenAddressMiner.mjs +7 -7
- package/package.json +2 -2
- package/dist/chunk-2ZM4JVFC.js.map +0 -1
- package/dist/chunk-3MVW6UIW.js.map +0 -1
- package/dist/chunk-3PNCB4W5.js +0 -4
- package/dist/chunk-3XYDN2XB.js.map +0 -1
- package/dist/chunk-5TL5V6UX.mjs +0 -3
- package/dist/chunk-5VV7STYK.js.map +0 -1
- package/dist/chunk-64ZQRKG3.mjs.map +0 -1
- package/dist/chunk-ADAAU4F5.mjs.map +0 -1
- package/dist/chunk-AZOBEWP3.mjs.map +0 -1
- package/dist/chunk-COOVGAOE.js.map +0 -1
- package/dist/chunk-CS6FVODR.mjs.map +0 -1
- package/dist/chunk-CUB4F546.js.map +0 -1
- package/dist/chunk-E2NF4AQB.mjs.map +0 -1
- package/dist/chunk-FVTTG72Z.mjs.map +0 -1
- package/dist/chunk-HJ4AS5DZ.mjs.map +0 -1
- package/dist/chunk-KITPRKQ4.mjs.map +0 -1
- package/dist/chunk-LPA32BIK.mjs.map +0 -1
- package/dist/chunk-M2EMKIP5.mjs.map +0 -1
- package/dist/chunk-MT34O3YL.js.map +0 -1
- package/dist/chunk-OF7BIKXV.js.map +0 -1
- package/dist/chunk-OGYWNJGI.js.map +0 -1
- package/dist/chunk-OROTK4OT.js.map +0 -1
- package/dist/chunk-QFQXHDC7.mjs.map +0 -1
- package/dist/chunk-QQEOKYEX.js.map +0 -1
- package/dist/chunk-RLUMYHPI.js.map +0 -1
- package/dist/chunk-SD7BHT2F.mjs +0 -3
- package/dist/chunk-SMTHFPBA.js.map +0 -1
- package/dist/chunk-VGCXJRUV.mjs.map +0 -1
- package/dist/chunk-VGOEXLQ2.js.map +0 -1
- package/dist/chunk-VK5HAWX6.mjs.map +0 -1
- package/dist/chunk-WDSV4O6T.mjs.map +0 -1
- package/dist/chunk-WKKOBMXR.js.map +0 -1
- package/dist/chunk-WTS75RUC.js +0 -4
- package/dist/chunk-ZRNPHFP3.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GENERATED_DOPPLER_DEPLOYMENTS } from './chunk-
|
|
1
|
+
import { GENERATED_DOPPLER_DEPLOYMENTS } from './chunk-VKSD3KXF.mjs';
|
|
2
2
|
|
|
3
3
|
// src/addresses.ts
|
|
4
4
|
var CHAIN_IDS = {
|
|
@@ -13,6 +13,13 @@ var CHAIN_IDS = {
|
|
|
13
13
|
MONAD_MAINNET: 143
|
|
14
14
|
};
|
|
15
15
|
var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
16
|
+
function getGeneratedAddress(chainId, key) {
|
|
17
|
+
const deployments = GENERATED_DOPPLER_DEPLOYMENTS[chainId];
|
|
18
|
+
return deployments?.[key];
|
|
19
|
+
}
|
|
20
|
+
function getRehypeDopplerHookInitializerAddress(chainId) {
|
|
21
|
+
return getGeneratedAddress(chainId, "RehypeDopplerHookInitializer") ?? getGeneratedAddress(chainId, "RehypeDopplerHook");
|
|
22
|
+
}
|
|
16
23
|
var ADDRESSES = {
|
|
17
24
|
[CHAIN_IDS.MAINNET]: {
|
|
18
25
|
airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].Airlock,
|
|
@@ -22,12 +29,19 @@ var ADDRESSES = {
|
|
|
22
29
|
v4Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].UniswapV4Initializer,
|
|
23
30
|
v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].UniswapV4ScheduledMulticurveInitializer,
|
|
24
31
|
dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].DopplerHookInitializer,
|
|
25
|
-
|
|
32
|
+
rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(
|
|
33
|
+
CHAIN_IDS.MAINNET
|
|
34
|
+
),
|
|
35
|
+
rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(
|
|
36
|
+
CHAIN_IDS.MAINNET
|
|
37
|
+
),
|
|
26
38
|
dopplerLens: ZERO_ADDRESS,
|
|
27
39
|
dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].DopplerDeployer,
|
|
28
40
|
poolManager: "0x000000000004444c5dc75cB358380D2e3dE08A90",
|
|
29
41
|
v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].UniswapV2Migrator,
|
|
30
42
|
v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].UniswapV4Migrator,
|
|
43
|
+
dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].DopplerHookMigrator,
|
|
44
|
+
rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].RehypeDopplerHookMigrator,
|
|
31
45
|
noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].NoOpMigrator,
|
|
32
46
|
governanceFactory: ZERO_ADDRESS,
|
|
33
47
|
noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET].NoOpGovernanceFactory,
|
|
@@ -47,12 +61,19 @@ var ADDRESSES = {
|
|
|
47
61
|
v4Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].UniswapV4Initializer,
|
|
48
62
|
v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].UniswapV4ScheduledMulticurveInitializer,
|
|
49
63
|
dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].DopplerHookInitializer,
|
|
50
|
-
|
|
64
|
+
rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(
|
|
65
|
+
CHAIN_IDS.ETH_SEPOLIA
|
|
66
|
+
),
|
|
67
|
+
rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(
|
|
68
|
+
CHAIN_IDS.ETH_SEPOLIA
|
|
69
|
+
),
|
|
51
70
|
dopplerLens: ZERO_ADDRESS,
|
|
52
71
|
dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].DopplerDeployer,
|
|
53
72
|
poolManager: "0xE03A1074c86CFeDd5C142C4F04F1a1536e203543",
|
|
54
73
|
v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].UniswapV2Migrator,
|
|
55
74
|
v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].UniswapV4Migrator,
|
|
75
|
+
dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].DopplerHookMigrator,
|
|
76
|
+
rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].RehypeDopplerHookMigrator,
|
|
56
77
|
noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].NoOpMigrator,
|
|
57
78
|
governanceFactory: ZERO_ADDRESS,
|
|
58
79
|
noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA].NoOpGovernanceFactory,
|
|
@@ -78,10 +99,13 @@ var ADDRESSES = {
|
|
|
78
99
|
dopplerLens: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].DopplerLensQuoter,
|
|
79
100
|
dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].DopplerDeployer,
|
|
80
101
|
poolManager: "0x498581ff718922c3f8e6a244956af099b2652b2b",
|
|
81
|
-
|
|
82
|
-
|
|
102
|
+
rehypeDopplerHookInitializer: "0x6AB5aE3191c914dE8437431091776Fc90f314bE4",
|
|
103
|
+
rehypeDopplerHook: "0x6AB5aE3191c914dE8437431091776Fc90f314bE4",
|
|
104
|
+
dopplerHookInitializer: "0xBDF938149ac6a781F94FAa0ed45E6A0e984c6544",
|
|
83
105
|
v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].UniswapV2Migrator,
|
|
84
106
|
v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].UniswapV4Migrator,
|
|
107
|
+
dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].DopplerHookMigrator,
|
|
108
|
+
rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].RehypeDopplerHookMigrator,
|
|
85
109
|
noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].NoOpMigrator,
|
|
86
110
|
governanceFactory: "0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9",
|
|
87
111
|
noOpGovernanceFactory: "0xe7dfbd5b0a2c3b4464653a9becdc489229ef090e",
|
|
@@ -107,13 +131,20 @@ var ADDRESSES = {
|
|
|
107
131
|
// From Doppler scheduled multicurve deployments (Base Sepolia)
|
|
108
132
|
v4DecayMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].DecayMulticurveInitializer,
|
|
109
133
|
// From Doppler decay multicurve deployments (Base Sepolia)
|
|
110
|
-
dopplerHookInitializer:
|
|
111
|
-
|
|
134
|
+
dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].DopplerHookInitializer,
|
|
135
|
+
rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(
|
|
136
|
+
CHAIN_IDS.BASE_SEPOLIA
|
|
137
|
+
),
|
|
138
|
+
rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(
|
|
139
|
+
CHAIN_IDS.BASE_SEPOLIA
|
|
140
|
+
),
|
|
112
141
|
dopplerLens: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].DopplerLensQuoter,
|
|
113
142
|
dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].DopplerDeployer,
|
|
114
143
|
poolManager: "0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408",
|
|
115
144
|
v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].UniswapV2Migrator,
|
|
116
145
|
v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].UniswapV4Migrator,
|
|
146
|
+
dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].DopplerHookMigrator,
|
|
147
|
+
rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].RehypeDopplerHookMigrator,
|
|
117
148
|
v4MigratorHook: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].UniswapV4MigratorHook,
|
|
118
149
|
noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].NoOpMigrator,
|
|
119
150
|
governanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA].GovernanceFactory,
|
|
@@ -235,12 +266,21 @@ var ADDRESSES = {
|
|
|
235
266
|
noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET].NoOpGovernanceFactory,
|
|
236
267
|
launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET].LaunchpadGovernanceFactory,
|
|
237
268
|
v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET].UniswapV4ScheduledMulticurveInitializer,
|
|
269
|
+
dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET].DopplerHookInitializer,
|
|
270
|
+
rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(
|
|
271
|
+
CHAIN_IDS.MONAD_MAINNET
|
|
272
|
+
),
|
|
273
|
+
rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(
|
|
274
|
+
CHAIN_IDS.MONAD_MAINNET
|
|
275
|
+
),
|
|
238
276
|
streamableFeesLocker: ZERO_ADDRESS,
|
|
239
277
|
// Not yet deployed
|
|
240
278
|
universalRouter: "0x0d97dc33264bfc1c226207428a79b26757fb9dc3",
|
|
241
279
|
univ2Router02: ZERO_ADDRESS,
|
|
242
280
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
243
281
|
bundler: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET].Bundler,
|
|
282
|
+
dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET].DopplerHookMigrator,
|
|
283
|
+
rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET].RehypeDopplerHookMigrator,
|
|
244
284
|
weth: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a",
|
|
245
285
|
// INFO: this is wmon, but we treat it as weth because mon is native
|
|
246
286
|
uniswapV4Quoter: "0xa222dd357a9076d1091ed6aa2e16c9742dd26891"
|
|
@@ -261,5 +301,5 @@ function isSupportedChainId(id) {
|
|
|
261
301
|
}
|
|
262
302
|
|
|
263
303
|
export { ADDRESSES, CHAIN_IDS, SUPPORTED_CHAIN_IDS, getAddresses, isSupportedChainId };
|
|
264
|
-
//# sourceMappingURL=chunk-
|
|
265
|
-
//# sourceMappingURL=chunk-
|
|
304
|
+
//# sourceMappingURL=chunk-WDC53TM7.mjs.map
|
|
305
|
+
//# sourceMapp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AA8B,sCAAA;AAAA,MAC5B,SAAA,CAAU;AAAA,KACZ;AAAA,IACA,iBAAA,EAAmB,sCAAA;AAAA,MACjB,SAAA,CAAU;AAAA,KACZ;AAAA,IACA,oBAAA,EAAsB,YAAA;AAAA;AAAA,IACtB,eAAA,EAAiB,4CAAA;AAAA,IACjB,aAAA,EAAe,YAAA;AAAA,IACf,OAAA,EAAS,4CAAA;AAAA,IACT,OAAA,EAAS,6BAAA,CAA8B,SAAA,CAAU,aAAa,CAAA,CAC3D,OAAA;AAAA,IACH,mBAAA,EAAqB,6BAAA,CAA8B,SAAA,CAAU,aAAa,CAAA,CACvE,mBAAA;AAAA,IACH,yBAAA,EAA2B,6BAAA,CACzB,SAAA,CAAU,aACZ,CAAA,CAAE,yBAAA;AAAA,IACF,IAAA,EAAM,4CAAA;AAAA;AAAA,IACN,eAAA,EAAiB;AAAA;AAErB;AAIO,SAAS,aAAa,OAAA,EAAiC;AAC5D,EAAA,MAAM,SAAA,GAAY,UAAU,OAA2B,CAAA;AACvD,EAAA,IAAI,CAAC,SAAA,EAAW;AACd,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,sBAAA,EAAyB,OAAO,CAAA,CAAE,CAAA;AAAA,EACpD;AACA,EAAA,OAAO,SAAA;AACT;AAKO,IAAM,sBAAsB,MAAA,CAAO,MAAA;AAAA,EACxC;AACF;AAKO,SAAS,mBAAmB,EAAA,EAAoC;AAErE,EAAA,OAAO,EAAA,IAAM,SAAA;AACf","file":"chunk-WDC53TM7.mjs","sourcesContent":["import { Address } from 'viem';\nimport { GENERATED_DOPPLER_DEPLOYMENTS } from './deployments.generated';\n\n// Chain IDs\nexport const CHAIN_IDS = {\n MAINNET: 1,\n ETH_SEPOLIA: 11155111,\n BASE: 8453,\n BASE_SEPOLIA: 84532,\n INK: 57073,\n UNICHAIN: 130,\n UNICHAIN_SEPOLIA: 1301,\n MONAD_TESTNET: 10143,\n MONAD_MAINNET: 143,\n} as const;\n\nexport type SupportedChainId = (typeof CHAIN_IDS)[keyof typeof CHAIN_IDS];\n\n// Human-friendly chain key type (e.g., 'BASE', 'UNICHAIN')\nexport type SupportedChainKey = keyof typeof CHAIN_IDS;\n\n// Contract addresses per chain\nexport interface ChainAddresses {\n // Core contracts\n airlock: Address;\n tokenFactory: Address;\n\n // Static auction contracts (V3)\n v3Initializer: Address;\n v3Quoter: Address;\n lockableV3Initializer?: Address;\n\n // Dynamic auction contracts (V4)\n v4Initializer: Address;\n // Multicurve initializer (V4) — optional per chain\n v4MulticurveInitializer?: Address;\n v4ScheduledMulticurveInitializer?: Address;\n v4DecayMulticurveInitializer?: Address;\n\n // DopplerHook system (for RehypeDopplerHook support)\n dopplerHookInitializer?: Address;\n rehypeDopplerHookInitializer?: Address;\n /**\n * @deprecated Use rehypeDopplerHookInitializer instead.\n */\n rehypeDopplerHook?: Address;\n dopplerLens: Address;\n dopplerDeployer: Address;\n poolManager: Address;\n\n // Doppler404 contracts\n doppler404Factory?: Address;\n\n // Migration contracts\n v2Migrator: Address;\n v4Migrator: Address;\n dopplerHookMigrator?: Address;\n rehypeDopplerHookMigrator?: Address;\n v4MigratorHook?: Address;\n noOpMigrator?: Address;\n\n // Governance contracts\n governanceFactory: Address;\n noOpGovernanceFactory?: Address;\n launchpadGovernanceFactory?: Address;\n streamableFeesLocker?: Address;\n\n // Router contracts\n universalRouter: Address;\n univ2Router02?: Address;\n permit2: Address;\n\n // Other contracts\n bundler?: Address;\n\n // Uniswap contracts\n weth: Address;\n uniswapV2Factory?: Address;\n uniswapV3Factory?: Address;\n uniswapV4Quoter: Address;\n}\n\n// Not yet deployed placeholder\nconst ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' as Address;\n\nfunction getGeneratedAddress(\n chainId: SupportedChainId,\n key: string,\n): Address | undefined {\n const deployments = GENERATED_DOPPLER_DEPLOYMENTS[\n chainId as unknown as keyof typeof GENERATED_DOPPLER_DEPLOYMENTS\n ] as Record<string, string> | undefined;\n return deployments?.[key] as Address | undefined;\n}\n\nfunction getRehypeDopplerHookInitializerAddress(\n chainId: SupportedChainId,\n): Address | undefined {\n return (\n getGeneratedAddress(chainId, 'RehypeDopplerHookInitializer') ??\n getGeneratedAddress(chainId, 'RehypeDopplerHook')\n );\n}\n\nexport const ADDRESSES: Record<SupportedChainId, ChainAddresses> = {\n [CHAIN_IDS.MAINNET]: {\n airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .Airlock as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .CloneERC20Factory as Address,\n v3Initializer: ZERO_ADDRESS,\n v3Quoter: ZERO_ADDRESS,\n v4Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .UniswapV4Initializer as Address,\n v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.MAINNET\n ].UniswapV4ScheduledMulticurveInitializer as Address,\n dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .DopplerHookInitializer as Address,\n rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.MAINNET,\n ),\n rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.MAINNET,\n ),\n dopplerLens: ZERO_ADDRESS,\n dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .DopplerDeployer as Address,\n poolManager: '0x000000000004444c5dc75cB358380D2e3dE08A90' as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .UniswapV2Migrator as Address,\n v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .UniswapV4Migrator as Address,\n dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .DopplerHookMigrator as Address,\n rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .RehypeDopplerHookMigrator as Address,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .NoOpMigrator as Address,\n governanceFactory: ZERO_ADDRESS,\n noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .NoOpGovernanceFactory as Address,\n streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MAINNET]\n .StreamableFeesLocker as Address,\n universalRouter: '0x66a9893cc07d91d95644aedd05d03f95e1dba8af' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n weth: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' as Address,\n uniswapV2Factory: '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f' as Address,\n uniswapV3Factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984' as Address,\n uniswapV4Quoter: '0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203' as Address,\n },\n [CHAIN_IDS.ETH_SEPOLIA]: {\n airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .Airlock as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .CloneERC20Factory as Address,\n v3Initializer: ZERO_ADDRESS,\n v3Quoter: ZERO_ADDRESS,\n v4Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .UniswapV4Initializer as Address,\n v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.ETH_SEPOLIA\n ].UniswapV4ScheduledMulticurveInitializer as Address,\n dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .DopplerHookInitializer as Address,\n rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.ETH_SEPOLIA,\n ),\n rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.ETH_SEPOLIA,\n ),\n dopplerLens: ZERO_ADDRESS,\n dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .DopplerDeployer as Address,\n poolManager: '0xE03A1074c86CFeDd5C142C4F04F1a1536e203543' as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .UniswapV2Migrator as Address,\n v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .UniswapV4Migrator as Address,\n dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .DopplerHookMigrator as Address,\n rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.ETH_SEPOLIA\n ].RehypeDopplerHookMigrator as Address,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .NoOpMigrator as Address,\n governanceFactory: ZERO_ADDRESS,\n noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .NoOpGovernanceFactory as Address,\n streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.ETH_SEPOLIA]\n .StreamableFeesLocker as Address,\n universalRouter: '0x3A9D48AB9751398BbFa63ad67599Bb04e4BdF98b' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n weth: '0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14' as Address,\n uniswapV4Quoter: '0x61b3f2011a92d183c7dbadbda940a7555ccf9227' as Address,\n },\n [CHAIN_IDS.BASE]: {\n airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].Airlock as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .TokenFactory80 as Address,\n v3Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .UniswapV3Initializer as Address,\n v3Quoter: '0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a' as Address,\n lockableV3Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .LockableUniswapV3Initializer as Address,\n v4Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .UniswapV4Initializer as Address,\n v4MulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .UniswapV4MulticurveInitializer as Address, // From Doppler multicurve deployments (Base mainnet)\n v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.BASE\n ].UniswapV4ScheduledMulticurveInitializer as Address, // From Doppler scheduled multicurve deployments (Base mainnet)\n v4DecayMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .DecayMulticurveInitializer as Address, // From Doppler decay multicurve deployments (Base mainnet)\n dopplerLens: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .DopplerLensQuoter as Address,\n dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .DopplerDeployer as Address,\n poolManager: '0x498581ff718922c3f8e6a244956af099b2652b2b' as Address,\n rehypeDopplerHookInitializer: \"0x6AB5aE3191c914dE8437431091776Fc90f314bE4\" as Address,\n rehypeDopplerHook: \"0x6AB5aE3191c914dE8437431091776Fc90f314bE4\" as Address,\n dopplerHookInitializer: \"0xBDF938149ac6a781F94FAa0ed45E6A0e984c6544\" as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .UniswapV2Migrator as Address,\n v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .UniswapV4Migrator as Address,\n dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .DopplerHookMigrator as Address,\n rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .RehypeDopplerHookMigrator as Address,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .NoOpMigrator as Address,\n governanceFactory: '0xb4deE32EB70A5E55f3D2d861F49Fb3D79f7a14d9' as Address,\n noOpGovernanceFactory:\n '0xe7dfbd5b0a2c3b4464653a9becdc489229ef090e' as Address,\n launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .LaunchpadGovernanceFactory as Address,\n streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE]\n .StreamableFeesLocker as Address,\n universalRouter: '0x6ff5693b99212da76ad316178a184ab56d299b43' as Address,\n univ2Router02: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE].Bundler as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n uniswapV4Quoter: '0x0d5e0f971ed27fbff6c2837bf31316121532048d' as Address,\n },\n [CHAIN_IDS.BASE_SEPOLIA]: {\n airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .Airlock as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .TokenFactory80 as Address,\n doppler404Factory: '0xdd8cea2890f1b3498436f19ec8da8fecc2cb7af7' as Address,\n v3Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .UniswapV3Initializer as Address,\n v3Quoter: '0xC5290058841028F1614F3A6F0F5816cAd0df5E27' as Address,\n lockableV3Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .LockableUniswapV3Initializer as Address,\n v4Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .UniswapV4Initializer as Address,\n v4MulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.BASE_SEPOLIA\n ].UniswapV4MulticurveInitializer as Address,\n v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.BASE_SEPOLIA\n ].UniswapV4ScheduledMulticurveInitializer as Address, // From Doppler scheduled multicurve deployments (Base Sepolia)\n v4DecayMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.BASE_SEPOLIA\n ].DecayMulticurveInitializer as Address, // From Doppler decay multicurve deployments (Base Sepolia)\n dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.BASE_SEPOLIA\n ].DopplerHookInitializer as Address,\n rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.BASE_SEPOLIA,\n ),\n rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.BASE_SEPOLIA,\n ),\n dopplerLens: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .DopplerLensQuoter as Address,\n dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .DopplerDeployer as Address,\n poolManager: '0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408' as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .UniswapV2Migrator as Address,\n v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .UniswapV4Migrator as Address,\n dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .DopplerHookMigrator as Address,\n rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.BASE_SEPOLIA\n ].RehypeDopplerHookMigrator as Address,\n v4MigratorHook: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .UniswapV4MigratorHook as Address,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .NoOpMigrator as Address,\n governanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .GovernanceFactory as Address,\n noOpGovernanceFactory:\n '0x916b8987e4ad325c10d58ed8dc2036a6ff5eb228' as Address,\n streamableFeesLocker: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.BASE_SEPOLIA]\n .StreamableFeesLocker as Address,\n universalRouter: '0x492E6456D9528771018DeB9E87ef7750EF184104' as Address,\n univ2Router02: '0x1689E7B1F10000AE47eBfE339a4f69dECd19F602' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x69DB7c20cDdA49Bed2bFb21e16Fa218330C50661' as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n uniswapV4Quoter: '0x4A6513c898fe1B2d0E78d3b0e0A4a151589B1cBa' as Address,\n },\n [CHAIN_IDS.INK]: {\n airlock: '0x014E1c0bd34f3B10546E554CB33B3293fECDD056' as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.INK]\n .TokenFactory as Address,\n v3Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.INK]\n .UniswapV3Initializer as Address,\n v3Quoter: '0x96b572D2d880cf2Fa2563651BD23ADE6f5516652' as Address,\n v4Initializer: '0xC99b485499f78995C6F1640dbB1413c57f8BA684' as Address,\n dopplerLens: '0x3972c00f7ed4885e145823eb7c655375d275a1c5' as Address,\n dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.INK]\n .DopplerDeployer as Address,\n poolManager: '0x360e68faccca8ca495c1b759fd9eee466db9fb32' as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.INK]\n .UniswapV2Migrator as Address,\n v4Migrator: ZERO_ADDRESS,\n governanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.INK]\n .GovernanceFactory as Address,\n noOpGovernanceFactory: ZERO_ADDRESS, // Not yet deployed\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0x112908dac86e20e7241b0927479ea3bf935d1fa0' as Address,\n univ2Router02: '0xB3FB126ACDd5AdCA2f50Ac644a7a2303745f18b4' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.INK].Bundler as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n uniswapV4Quoter: '0x3972c00f7ed4885e145823eb7c655375d275a1c5' as Address,\n },\n [CHAIN_IDS.UNICHAIN]: {\n airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .Airlock as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .TokenFactory as Address,\n v3Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .UniswapV3Initializer as Address,\n v3Quoter: '0x385A5cf5F83e99f7BB2852b6A19C3538b9FA7658' as Address,\n v4Initializer: '0x2F2BAcd46d3F5c9EE052Ab392b73711dB89129DB' as Address,\n dopplerLens: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0' as Address,\n dopplerDeployer: '0x06FEFD02F0b6d9f57F52cfacFc113665Dfa20F0f' as Address,\n poolManager: '0x1f98400000000000000000000000000000000004' as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .UniswapV2Migrator as Address,\n v4Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .UniswapV4Migrator as Address,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .NoOpMigrator as Address,\n governanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .GovernanceFactory as Address,\n noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .NoOpGovernanceFactory as Address,\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0xef740bf23acae26f6492b10de645d6b98dc8eaf3' as Address,\n univ2Router02: '0x284f11109359a7e1306c3e447ef14d38400063ff' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN]\n .Bundler as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n uniswapV4Quoter: '0x333e3c607b141b18ff6de9f258db6e77fe7491e0' as Address,\n },\n [CHAIN_IDS.UNICHAIN_SEPOLIA]: {\n airlock: '0x651ab94B4777e2e4cdf96082d90C65bd947b73A4' as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN_SEPOLIA]\n .TokenFactory as Address,\n v3Initializer: '0x7Fb9a622186B4660A5988C223ebb9d3690dD5007' as Address,\n v3Quoter: '0x6Dd37329A1A225a6Fca658265D460423DCafBF89' as Address,\n v4Initializer: '0x992375478626E67F4e639d3298EbCAaE51C3dF0b' as Address,\n dopplerLens: '0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472' as Address,\n dopplerDeployer: '0x2f2bacd46d3f5c9ee052ab392b73711db89129db' as Address,\n poolManager: '0x00B036B58a818B1BC34d502D3fE730Db729e62AC' as Address,\n v2Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address,\n v4Migrator: '0x44C448E38A2C3D206c9132E7f645510dFbBC946b' as Address,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.UNICHAIN_SEPOLIA]\n .NoOpMigrator as Address,\n governanceFactory: '0x1E4332EEfAE9e4967C2D186f7b2d439D778e81cC' as Address,\n noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.UNICHAIN_SEPOLIA\n ].NoOpGovernanceFactory as Address,\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0xf70536B3bcC1bD1a972dc186A2cf84cC6da6Be5D' as Address,\n univ2Router02: '0x284f11109359a7e1306c3e447ef14d38400063ff' as Address,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: '0x63f8C8F9beFaab2FaCD7Ece0b0242f78B920Ee90' as Address,\n weth: '0x4200000000000000000000000000000000000006' as Address,\n uniswapV4Quoter: '0x56dcd40a3f2d466f48e7f48bdbe5cc9b92ae4472' as Address,\n },\n [CHAIN_IDS.MONAD_TESTNET]: {\n airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .Airlock as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .TokenFactory80 as Address,\n v3Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .UniswapV3Initializer as Address,\n v3Quoter: ZERO_ADDRESS,\n v4Initializer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .UniswapV4Initializer as Address,\n dopplerLens: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .DopplerLensQuoter as Address,\n dopplerDeployer: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .DopplerDeployer as Address,\n poolManager: '0xe93882f395B0b24180855c68Ab19B2d78573ceBc' as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .UniswapV2Migrator as Address,\n v4Migrator: '0xBEd386a1Fc62B6598c9b8d2BF634471B6Fe75EB7' as Address,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .NoOpMigrator as Address,\n governanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .GovernanceFactory as Address,\n noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.MONAD_TESTNET\n ].NoOpGovernanceFactory as Address,\n streamableFeesLocker:\n '0x91231cDdD8d6C86Df602070a3081478e074b97b7' as Address, // Not yet deployed\n universalRouter: ZERO_ADDRESS,\n univ2Router02: ZERO_ADDRESS,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_TESTNET]\n .Bundler as Address,\n weth: ZERO_ADDRESS, // TODO: Get Monad Testnet weth\n uniswapV4Quoter: ZERO_ADDRESS,\n },\n [CHAIN_IDS.MONAD_MAINNET]: {\n airlock: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET]\n .Airlock as Address,\n tokenFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET]\n .TokenFactory80 as Address,\n v3Initializer: ZERO_ADDRESS,\n v3Quoter: '0x66266174564170519409d8853898f065c719536b' as Address,\n v4Initializer: ZERO_ADDRESS,\n dopplerLens: ZERO_ADDRESS,\n dopplerDeployer: ZERO_ADDRESS,\n poolManager: '0x188d586ddcf52439676ca21a244753fa19f9ea8e' as Address,\n v2Migrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET]\n .UniswapV2Migrator as Address,\n v4Migrator: ZERO_ADDRESS,\n noOpMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET]\n .NoOpMigrator as Address,\n governanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET]\n .GovernanceFactory as Address,\n noOpGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.MONAD_MAINNET\n ].NoOpGovernanceFactory as Address,\n launchpadGovernanceFactory: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.MONAD_MAINNET\n ].LaunchpadGovernanceFactory as Address,\n v4ScheduledMulticurveInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.MONAD_MAINNET\n ].UniswapV4ScheduledMulticurveInitializer as Address,\n dopplerHookInitializer: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.MONAD_MAINNET\n ].DopplerHookInitializer as Address,\n rehypeDopplerHookInitializer: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.MONAD_MAINNET,\n ),\n rehypeDopplerHook: getRehypeDopplerHookInitializerAddress(\n CHAIN_IDS.MONAD_MAINNET,\n ),\n streamableFeesLocker: ZERO_ADDRESS, // Not yet deployed\n universalRouter: '0x0d97dc33264bfc1c226207428a79b26757fb9dc3' as Address,\n univ2Router02: ZERO_ADDRESS,\n permit2: '0x000000000022D473030F116dDEE9F6B43aC78BA3' as Address,\n bundler: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET]\n .Bundler as Address,\n dopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[CHAIN_IDS.MONAD_MAINNET]\n .DopplerHookMigrator as Address,\n rehypeDopplerHookMigrator: GENERATED_DOPPLER_DEPLOYMENTS[\n CHAIN_IDS.MONAD_MAINNET\n ].RehypeDopplerHookMigrator as Address,\n weth: '0x3bd359c1119da7da1d913d1c4d2b7c461115433a' as Address, // INFO: this is wmon, but we treat it as weth because mon is native\n uniswapV4Quoter: '0xa222dd357a9076d1091ed6aa2e16c9742dd26891' as Address,\n },\n};\n/**\n * Get addresses for a specific chain\n */\nexport function getAddresses(chainId: number): ChainAddresses {\n const addresses = ADDRESSES[chainId as SupportedChainId];\n if (!addresses) {\n throw new Error(`Unsupported chain ID: ${chainId}`);\n }\n return addresses;\n}\n\n/**\n * List of supported chain IDs for easy iteration/validation\n */\nexport const SUPPORTED_CHAIN_IDS = Object.values(\n CHAIN_IDS,\n) as SupportedChainId[];\n\n/**\n * Runtime/type guard for narrowing a number to SupportedChainId\n */\nexport function isSupportedChainId(id: number): id is SupportedChainId {\n // Numeric object keys are coerced to strings at runtime; `in` is fine here\n return id in ADDRESSES;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CHAIN_IDS } from './chunk-
|
|
1
|
+
import { CHAIN_IDS } from './chunk-WDC53TM7.mjs';
|
|
2
2
|
|
|
3
3
|
// src/types.ts
|
|
4
4
|
var NO_OP_ENABLED_CHAIN_IDS = [
|
|
@@ -28,7 +28,12 @@ var LockablePoolStatus = /* @__PURE__ */ ((LockablePoolStatus2) => {
|
|
|
28
28
|
LockablePoolStatus2[LockablePoolStatus2["Exited"] = 3] = "Exited";
|
|
29
29
|
return LockablePoolStatus2;
|
|
30
30
|
})(LockablePoolStatus || {});
|
|
31
|
+
var RehypeFeeRoutingMode = /* @__PURE__ */ ((RehypeFeeRoutingMode2) => {
|
|
32
|
+
RehypeFeeRoutingMode2[RehypeFeeRoutingMode2["DirectBuyback"] = 0] = "DirectBuyback";
|
|
33
|
+
RehypeFeeRoutingMode2[RehypeFeeRoutingMode2["RouteToBeneficiaryFees"] = 1] = "RouteToBeneficiaryFees";
|
|
34
|
+
return RehypeFeeRoutingMode2;
|
|
35
|
+
})(RehypeFeeRoutingMode || {});
|
|
31
36
|
|
|
32
|
-
export { LAUNCHPAD_ENABLED_CHAIN_IDS, LockablePoolStatus, NO_OP_ENABLED_CHAIN_IDS, isLaunchpadEnabledChain, isNoOpEnabledChain };
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
export { LAUNCHPAD_ENABLED_CHAIN_IDS, LockablePoolStatus, NO_OP_ENABLED_CHAIN_IDS, RehypeFeeRoutingMode, isLaunchpadEnabledChain, isNoOpEnabledChain };
|
|
38
|
+
//# sourceMappingURL=chunk-WKWP42TD.mjs.map
|
|
39
|
+
//# sourceMappingURL=chunk-WKWP42TD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"names":["LockablePoolStatus","RehypeFeeRoutingMode"],"mappings":";;;AAkFO,IAAM,uBAAA,GAA0B;AAAA,EACrC,SAAA,CAAU,OAAA;AAAA,EACV,SAAA,CAAU,WAAA;AAAA,EACV,SAAA,CAAU,IAAA;AAAA,EACV,SAAA,CAAU,YAAA;AAAA,EACV,SAAA,CAAU,QAAA;AAAA,EACV,SAAA,CAAU,gBAAA;AAAA,EACV,SAAA,CAAU,aAAA;AAAA,EACV,SAAA,CAAU;AACZ;AAOO,SAAS,mBACd,OAAA,EAC+B;AAC/B,EAAA,OAAQ,uBAAA,CAA8C,SAAS,OAAO,CAAA;AACxE;AAGO,IAAM,2BAAA,GAA8B;AAAA,EACzC,SAAA,CAAU,IAAA;AAAA,EACV,SAAA,CAAU;AACZ;AAQO,SAAS,wBACd,OAAA,EACoC;AACpC,EAAA,OAAQ,2BAAA,CAAkD,SAAS,OAAO,CAAA;AAC5E;AA8BO,IAAK,kBAAA,qBAAAA,mBAAAA,KAAL;AACL,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,mBAAgB,CAAA,CAAA,GAAhB,eAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,iBAAc,CAAA,CAAA,GAAd,aAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AAJU,EAAA,OAAAA,mBAAAA;AAAA,CAAA,EAAA,kBAAA,IAAA,EAAA;AA2lBL,IAAK,oBAAA,qBAAAC,qBAAAA,KAAL;AACL,EAAAA,qBAAAA,CAAAA,qBAAAA,CAAA,mBAAgB,CAAA,CAAA,GAAhB,eAAA;AACA,EAAAA,qBAAAA,CAAAA,qBAAAA,CAAA,4BAAyB,CAAA,CAAA,GAAzB,wBAAA;AAFU,EAAA,OAAAA,qBAAAA;AAAA,CAAA,EAAA,oBAAA,IAAA,EAAA","file":"chunk-WKWP42TD.mjs","sourcesContent":["import {\n base,\n baseSepolia,\n ink,\n mainnet,\n sepolia,\n unichain,\n} from 'viem/chains';\nimport { CHAIN_IDS, type SupportedChainId } from './addresses';\n// Re-export SupportedChainId so consumers can import from this module\nexport { type SupportedChainId } from './addresses';\nimport type { Address, WalletClient } from 'viem';\n\nexport type SupportedChain =\n | typeof mainnet\n | typeof sepolia\n | typeof base\n | typeof baseSepolia\n | typeof ink\n | typeof unichain;\n// Use a wide type to avoid cross-package viem type identity issues when linking packages locally.\nexport type SupportedPublicClient = unknown;\n\n// Core configuration types\n// Token configuration (discriminated union)\nexport interface StandardTokenConfig {\n type?: 'standard'; // default behavior (backwards compatible)\n name: string;\n symbol: string;\n tokenURI: string;\n yearlyMintRate?: bigint; // Optional yearly mint rate (in WAD, default: 2% = 0.02e18)\n}\n\nexport interface Doppler404TokenConfig {\n type: 'doppler404';\n name: string;\n symbol: string;\n baseURI: string;\n // Optional unit for DN404 factory (uint256). Defaults to 1000 when omitted.\n unit?: bigint;\n}\n\nexport type TokenConfig = StandardTokenConfig | Doppler404TokenConfig;\n\nexport interface SaleConfig {\n initialSupply: bigint;\n numTokensToSell: bigint;\n numeraire: Address; // e.g., WETH address\n}\n\n// Static Auction Pool configuration\nexport interface StaticPoolConfig {\n startTick: number;\n endTick: number;\n fee: number; // e.g., 3000 for 0.3%\n // Optional parameters for lockable initializer\n numPositions?: number; // Number of liquidity positions (default: based on tick range)\n maxShareToBeSold?: bigint; // Maximum share of tokens to sell (in WAD, default: 1e18 = 100%)\n beneficiaries?: BeneficiaryData[]; // Optional beneficiaries for fee streaming\n}\n\n// Dynamic Auction configuration\nexport interface DynamicAuctionConfig {\n duration: number; // in seconds\n epochLength: number; // in seconds\n startTick: number;\n endTick: number;\n gamma?: number; // Optional, can be auto-calculated\n minProceeds: bigint;\n maxProceeds: bigint;\n numPdSlugs?: number; // Price discovery slugs (optional)\n}\n\n// Vesting configuration\nexport interface VestingConfig {\n duration: number; // in seconds\n cliffDuration: number; // in seconds\n recipients?: Address[]; // Optional array of recipient addresses (defaults to [userAddress] if not specified)\n amounts?: bigint[]; // Optional array of vesting amounts per recipient (must match recipients length if provided)\n}\n\n// Chains where no-op governance is enabled\nexport const NO_OP_ENABLED_CHAIN_IDS = [\n CHAIN_IDS.MAINNET,\n CHAIN_IDS.ETH_SEPOLIA,\n CHAIN_IDS.BASE,\n CHAIN_IDS.BASE_SEPOLIA,\n CHAIN_IDS.UNICHAIN,\n CHAIN_IDS.UNICHAIN_SEPOLIA,\n CHAIN_IDS.MONAD_TESTNET,\n CHAIN_IDS.MONAD_MAINNET,\n] as const;\n\nexport type NoOpEnabledChainId = (typeof NO_OP_ENABLED_CHAIN_IDS)[number];\n\n/**\n * Check if a chain supports no-op governance\n */\nexport function isNoOpEnabledChain(\n chainId: number,\n): chainId is NoOpEnabledChainId {\n return (NO_OP_ENABLED_CHAIN_IDS as readonly number[]).includes(chainId);\n}\n\n// Chains where launchpad governance is enabled\nexport const LAUNCHPAD_ENABLED_CHAIN_IDS = [\n CHAIN_IDS.BASE,\n CHAIN_IDS.MONAD_MAINNET,\n] as const;\n\nexport type LaunchpadEnabledChainId =\n (typeof LAUNCHPAD_ENABLED_CHAIN_IDS)[number];\n\n/**\n * Check if a chain supports launchpad governance\n */\nexport function isLaunchpadEnabledChain(\n chainId: number,\n): chainId is LaunchpadEnabledChainId {\n return (LAUNCHPAD_ENABLED_CHAIN_IDS as readonly number[]).includes(chainId);\n}\n\n// Governance configuration (discriminated union)\nexport type GovernanceDefault = { type: 'default' };\nexport interface GovernanceCustom {\n type: 'custom';\n initialVotingDelay: number;\n initialVotingPeriod: number;\n initialProposalThreshold: bigint;\n}\nexport type GovernanceNoOp = { type: 'noOp' };\nexport interface GovernanceLaunchpad {\n type: 'launchpad';\n multisig: Address;\n}\n\nexport type GovernanceOption<C extends SupportedChainId> =\n | GovernanceDefault\n | GovernanceCustom\n | (C extends NoOpEnabledChainId ? GovernanceNoOp : never)\n | (C extends LaunchpadEnabledChainId ? GovernanceLaunchpad : never);\n\n// Unified beneficiary data used for fee streaming, lockable initializers, and migration configs\n// Uses shares in WAD format (1e18 = 100%) for consistency across all beneficiary configurations\nexport interface BeneficiaryData {\n beneficiary: Address;\n shares: bigint; // shares in WAD (1e18 = 100%)\n}\n\n// Pool status for lockable initializer\nexport enum LockablePoolStatus {\n Uninitialized = 0,\n Initialized = 1,\n Locked = 2,\n Exited = 3,\n}\n\n// Lockable pool state\nexport interface LockablePoolState {\n asset: Address;\n numeraire: Address;\n tickLower: number;\n tickUpper: number;\n maxShareToBeSold: bigint;\n totalTokensOnBondingCurve: bigint;\n status: LockablePoolStatus;\n}\n\n// Multicurve pool state (V4 initializer)\nexport interface MulticurvePoolState {\n asset: Address;\n numeraire: Address;\n fee: number;\n tickSpacing: number;\n status: LockablePoolStatus; // Reuses the same enum\n poolKey: V4PoolKey;\n farTick: number;\n}\n\n// Migration configuration (discriminated union)\nexport interface RehypeDopplerHookMigratorConfig {\n // Optional hook address override. Defaults to chain rehypeDopplerHookMigrator.\n hookAddress?: Address;\n // Destination address for buyback tokens / beneficiary fee claims.\n buybackDestination: Address;\n // Custom swap fee in hundredths of a bip (1e6 = 100%).\n customFee: number;\n // Routing mode for buyback-designated fees. Defaults to DirectBuyback.\n feeRoutingMode?:\n | RehypeFeeRoutingMode\n | 'directBuyback'\n | 'routeToBeneficiaryFees';\n // Current fee routing matrix API.\n feeDistributionInfo?: RehypeFeeDistributionInfo;\n\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n * If feeDistributionInfo is omitted, legacy percentages are mirrored to both rows.\n */\n assetBuybackPercentWad?: bigint;\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n */\n numeraireBuybackPercentWad?: bigint;\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n */\n beneficiaryPercentWad?: bigint;\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n */\n lpPercentWad?: bigint;\n}\n\nexport interface DopplerHookMigrationConfig {\n type: 'dopplerHook';\n // Fee for fixed-fee pools, or initial LP fee when useDynamicFee=true.\n fee: number;\n // Use dynamic LP fees on the migrated V4 pool.\n useDynamicFee?: boolean;\n // Tick spacing for the migrated V4 pool.\n tickSpacing: number;\n // Fee lock duration in seconds.\n lockDuration: number;\n // Fee streaming beneficiaries (must be sorted and sum to WAD onchain).\n beneficiaries: BeneficiaryData[];\n // Generic hook configuration (raw initialization calldata).\n hook?: {\n hookAddress: Address;\n onInitializationCalldata?: `0x${string}`;\n };\n // Ergonomic helper for RehypeDopplerHookMigrator initialization.\n rehype?: RehypeDopplerHookMigratorConfig;\n // Optional proceeds split paid out during migration.\n proceedsSplit?: {\n recipient: Address;\n share: bigint;\n };\n}\n\nexport type MigrationConfig =\n | { type: 'uniswapV2' } // Basic migration to a new Uniswap v2 pool\n | {\n type: 'uniswapV4';\n fee: number;\n tickSpacing: number;\n // Configuration for fee streaming via StreamableFeesLocker (optional)\n // When omitted, fees are not locked and beneficiaries are not configured\n // This is useful when using noOp governance where lock duration is not meaningful\n streamableFees?: {\n lockDuration: number; // in seconds\n beneficiaries: BeneficiaryData[]; // Uses shares in WAD (1e18 = 100%)\n };\n }\n | DopplerHookMigrationConfig // Dynamic-only: migration via DopplerHookMigrator\n | { type: 'noOp' }; // No migration - used with lockable beneficiaries\n\n// Create Static Auction parameters\nexport interface CreateStaticAuctionParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Static Auction (Uniswap v3) Pool configuration\n pool: StaticPoolConfig;\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration (required). Use `{ type: 'noOp' }` where enabled,\n // `{ type: 'default' }` for standard defaults, or `{ type: 'custom', ... }` to customize.\n governance: GovernanceOption<C>;\n\n // Explicit Migration Configuration\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n\n // Optional transaction gas limit override for the create() transaction\n // If omitted, SDK will default to 13,500,000 gas for create()\n gas?: bigint;\n}\n\n// Create Dynamic Auction parameters\nexport interface CreateDynamicAuctionParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Dynamic Auction (Uniswap v4 Hook) configuration\n auction: DynamicAuctionConfig;\n\n // Pool configuration\n pool: {\n fee: number; // e.g., 3000 for 0.3%\n tickSpacing: number;\n };\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration (required). Use `{ type: 'noOp' }` where enabled,\n // `{ type: 'default' }` for standard defaults, or `{ type: 'custom', ... }` to customize.\n governance: GovernanceOption<C>;\n\n // Explicit Migration Configuration\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Time configuration (internal use)\n startTimeOffset?: number;\n blockTimestamp?: number; // Optional: use this block timestamp instead of fetching latest\n\n // Optional transaction gas limit override for the create() transaction\n // If omitted, SDK will default to 13,500,000 gas for create()\n gas?: bigint;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n}\n\n// Price range configuration for automatic tick calculation\nexport interface PriceRange {\n startPrice: number;\n endPrice: number;\n}\n\n// Tick range configuration\nexport interface TickRange {\n startTick: number;\n endTick: number;\n}\n\n// ============================================================================\n// Market Cap Configuration Types\n// ============================================================================\n\n/**\n * Market cap range in USD for price configurations.\n * Used to define start and end market caps for bonding curves.\n */\nexport interface MarketCapRange {\n /** Starting market cap in USD (e.g., 100_000 for $100k) */\n start: number;\n /** Ending market cap in USD (e.g., 10_000_000 for $10M) */\n end: number;\n}\n\n/**\n * Base configuration for market cap-based tick calculations.\n * Used by builder methods to convert market caps to ticks.\n */\nexport interface MarketCapConfig {\n /** Target market cap range in USD */\n marketCap: MarketCapRange;\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Token supply override. If not provided, inferred from saleConfig.initialSupply.\n * Must include decimals (e.g., parseEther('1000000000') for 1B tokens).\n */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n}\n\n/**\n * Market cap configuration for V3 Static Auctions.\n * Extends base config with V3-specific parameters.\n */\nexport interface StaticAuctionMarketCapConfig extends MarketCapConfig {\n /** Fee tier in basis points (e.g., 10000 for 1%). Default: 10000 */\n fee?: number;\n /** Number of liquidity positions. Default: 15 */\n numPositions?: number;\n /** Maximum share of tokens to sell per position (WAD). Default: 35% */\n maxShareToBeSold?: bigint;\n}\n\n/**\n * Market cap range for V4 Dynamic Auctions (Dutch auctions).\n * Uses start/min because price descends from start to minimum.\n */\nexport interface DynamicMarketCapRange {\n /** Starting market cap in USD - auction begins here (e.g., 500_000 for $500k) */\n start: number;\n /** Minimum market cap in USD - floor price the auction descends to (e.g., 50_000 for $50k) */\n min: number;\n}\n\n/**\n * Market cap configuration for V4 Dynamic Auctions.\n * Uses start/min (not start/end) because Dutch auctions descend from start to minimum.\n */\nexport interface DynamicAuctionMarketCapConfig {\n /** Target market cap range (start = launch price, min = floor price) */\n marketCap: DynamicMarketCapRange;\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Token supply override. If not provided, inferred from saleConfig.initialSupply.\n * Must include decimals (e.g., parseEther('1000000000') for 1B tokens).\n */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n /**\n * Pool fee in basis points. Default: 10000 (1%)\n *\n * V4 pools support any fee from 0 to 100,000 (10%).\n * Standard tiers (100, 500, 3000, 10000) auto-derive tickSpacing.\n * Custom fees require explicit tickSpacing parameter.\n */\n fee?: number;\n /**\n * Tick spacing for the pool. Required for custom fees.\n *\n * Must be <= 30 for Doppler pools (MAX_TICK_SPACING constraint).\n * If not provided with a standard fee tier, defaults to 30.\n */\n tickSpacing?: number;\n /** Minimum proceeds required for successful auction */\n minProceeds: bigint;\n /** Maximum proceeds cap for the auction */\n maxProceeds: bigint;\n /** Auction duration in seconds. Default: 7 days */\n duration?: number;\n /** Epoch length in seconds. Default: 3600 (1 hour) */\n epochLength?: number;\n /** Gamma (tick decay per epoch). Auto-calculated if not provided */\n gamma?: number;\n /** Number of price discovery slugs. Default: 5 */\n numPdSlugs?: number;\n}\n\n/**\n * Result of market cap parameter validation.\n */\nexport interface MarketCapValidationResult {\n /** Whether all parameters are within normal bounds */\n valid: boolean;\n /** Warning messages for unusual but technically valid values */\n warnings: string[];\n}\n\n// ============================================================================\n// Market Cap Helper Function Parameter Types\n// ============================================================================\n\n/**\n * Parameters for converting market cap range to ticks for V3 Static Auctions.\n */\nexport interface StaticAuctionTickParams {\n marketCapRange: MarketCapRange;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting market cap range to ticks for V4 Dynamic Auctions.\n */\nexport interface DynamicAuctionTickParams {\n marketCapRange: MarketCapRange;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n numeraire: Address;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting market cap range to ticks for V4 Multicurve pools.\n */\nexport interface MulticurveTickRangeParams {\n marketCapLower: number;\n marketCapUpper: number | 'max';\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting a single market cap to a tick for Multicurve.\n */\nexport interface MulticurveTickParams {\n marketCapUSD: number;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting a tick to market cap (reverse conversion).\n */\nexport interface TickToMarketCapParams {\n tick: number;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n// ============================================================================\n// New Multicurve Market Cap API (no tick math required)\n// ============================================================================\n\n/**\n * Curve configuration for Multicurve pools using market cap ranges.\n * Each curve defines a market cap range and liquidity distribution.\n */\nexport interface MulticurveMarketCapRangeCurve {\n /** Market cap range for this curve */\n marketCap: {\n /** Start market cap in USD (for the first curve, this is the launch price) */\n start: number;\n /** End market cap in USD, or 'max' for MAX_TICK rounded to tick spacing */\n end: number | 'max';\n };\n /** Number of liquidity positions in this curve */\n numPositions: number;\n /** Share of total supply allocated to this curve (WAD, e.g., parseEther('0.3') = 30%) */\n shares: bigint;\n}\n\n/**\n * Market cap-based configuration for Multicurve pools.\n * No tick math required - just specify market caps in USD.\n */\nexport interface MulticurveMarketCapCurvesConfig {\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Array of curves defining market cap ranges and liquidity distribution.\n * The first curve's marketCap.start is the launch price.\n * Curves must be contiguous (no gaps allowed).\n */\n curves: MulticurveMarketCapRangeCurve[];\n /** Token supply override */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n /** Fee tier (default: FEE_TIERS.LOW) */\n fee?: number;\n /** Tick spacing (derived from fee if not provided) */\n tickSpacing?: number;\n /** Optional beneficiaries for fee streaming */\n beneficiaries?: BeneficiaryData[];\n}\n\n// Build configuration for static auctions (V3-style)\nexport interface StaticAuctionBuildConfig {\n // Token details\n name: string;\n symbol: string;\n totalSupply?: bigint; // default: 1 billion\n numTokensToSell?: bigint; // default: 900 million\n tokenURI: string;\n\n // Time parameters\n startTimeOffset?: number; // Optional - seconds to add to current block timestamp (default: 30)\n\n // Price parameters - must provide either priceRange or tickRange\n numeraire: Address; // Required for V3\n tickRange?: TickRange;\n priceRange?: PriceRange;\n fee?: number; // default: 10000 (1%)\n\n // Pool parameters (V3 specific)\n numPositions?: number; // default: 15\n maxShareToBeSold?: bigint; // default: 35% in WAD\n\n // Vesting parameters\n yearlyMintRate?: bigint; // default: 2%\n vestingDuration?: bigint; // default: 1 year\n recipients?: Address[]; // defaults to [userAddress]\n amounts?: bigint[]; // defaults based on pre-mint calculation\n\n // Migration configuration\n migration: MigrationConfig;\n\n // Other parameters\n integrator?: Address;\n useGovernance?: boolean; // default: true\n}\n\n// Build configuration for dynamic auctions (V4-style)\nexport interface DynamicAuctionBuildConfig {\n // Token details\n name: string;\n symbol: string;\n totalSupply: bigint;\n numTokensToSell: bigint;\n tokenURI: string;\n\n // Time parameters\n startTimeOffset?: number; // Optional - seconds to add to block timestamp (default: 30)\n blockTimestamp?: number; // Optional - specific block timestamp to use (default: fetch latest)\n duration?: number; // in seconds (default: 604800 = 7 days)\n epochLength?: number; // in seconds (default: 3600)\n\n // Price parameters - must provide either priceRange or tickRange\n numeraire?: Address; // defaults to zero address\n tickRange?: TickRange;\n priceRange?: PriceRange;\n tickSpacing: number;\n gamma?: number; // auto-calculated if not provided\n fee: number; // In basis points\n\n // Sale parameters\n minProceeds: bigint;\n maxProceeds: bigint;\n numPdSlugs?: number; // default: 5\n\n // Vesting parameters\n yearlyMintRate?: bigint; // default: 2%\n vestingDuration: bigint;\n recipients: Address[];\n amounts: bigint[];\n\n // Migration configuration\n migration: MigrationConfig;\n\n // Other parameters\n integrator?: Address;\n useGovernance?: boolean; // default: true\n}\n\n// SDK initialization configuration\nexport interface DopplerSDKConfig {\n publicClient: SupportedPublicClient;\n walletClient?: WalletClient;\n chainId: number;\n}\n\n// Pool information types\nexport interface PoolInfo {\n address: Address;\n tokenAddress: Address;\n numeraireAddress: Address;\n fee: number;\n liquidity: bigint;\n sqrtPriceX96: bigint;\n}\n\nexport interface HookInfo {\n hookAddress: Address;\n tokenAddress: Address;\n numeraireAddress: Address;\n poolId: string;\n currentEpoch: number;\n totalProceeds: bigint;\n totalTokensSold: bigint;\n earlyExit: boolean;\n insufficientProceeds: boolean;\n startingTime: bigint;\n endingTime: bigint;\n epochLength: bigint;\n minimumProceeds: bigint;\n maximumProceeds: bigint;\n}\n\n// Quote result type\nexport interface QuoteResult {\n amountOut: bigint;\n priceImpact: number;\n fee: bigint;\n route: string[];\n}\n\n// Lockable Uniswap V3 Initializer encode params\nexport interface LockableV3InitializerParams {\n fee: number;\n tickLower: number;\n tickUpper: number;\n numPositions: number;\n maxShareToBeSold: bigint;\n beneficiaries: BeneficiaryData[];\n}\n\n// Multicurve curve configuration (mirrors solidity struct)\nexport interface MulticurveCurve {\n tickLower: number; // int24\n tickUpper: number; // int24\n numPositions: number; // uint16\n shares: bigint; // uint256 (WAD)\n}\n\nexport type MulticurveMarketCapPreset = 'low' | 'medium' | 'high';\n\nexport interface V4PoolKey {\n currency0: Address;\n currency1: Address;\n fee: number;\n tickSpacing: number;\n hooks: Address;\n}\n\nexport interface MulticurveBundleExactOutResult {\n asset: Address;\n poolKey: V4PoolKey;\n amountIn: bigint;\n gasEstimate: bigint;\n}\n\nexport interface MulticurveBundleExactInResult {\n asset: Address;\n poolKey: V4PoolKey;\n amountOut: bigint;\n gasEstimate: bigint;\n}\n\n// RehypeDopplerHook configuration for fee distribution and buyback\nexport interface RehypeFeeDistributionInfo {\n assetFeesToAssetBuybackWad: bigint;\n assetFeesToNumeraireBuybackWad: bigint;\n assetFeesToBeneficiaryWad: bigint;\n assetFeesToLpWad: bigint;\n numeraireFeesToAssetBuybackWad: bigint;\n numeraireFeesToNumeraireBuybackWad: bigint;\n numeraireFeesToBeneficiaryWad: bigint;\n numeraireFeesToLpWad: bigint;\n}\n\nexport enum RehypeFeeRoutingMode {\n DirectBuyback = 0,\n RouteToBeneficiaryFees = 1,\n}\n\n// Initializer-side RehypeDopplerHook configuration.\n// Supports both the current API and deprecated legacy fields for compatibility.\nexport interface RehypeDopplerHookConfig {\n // The hook contract address (must be whitelisted in the initializer)\n hookAddress: Address;\n // Destination address for buyback tokens / beneficiary fee claims\n buybackDestination: Address;\n\n // Current fee schedule API\n startFee?: number;\n endFee?: number;\n durationSeconds?: number | bigint;\n startingTime?: number | bigint | Date;\n feeRoutingMode?:\n | RehypeFeeRoutingMode\n | 'directBuyback'\n | 'routeToBeneficiaryFees';\n feeDistributionInfo?: RehypeFeeDistributionInfo;\n\n /**\n * @deprecated Use startFee/endFee instead. When provided alone, maps to startFee=endFee=customFee.\n */\n customFee?: number;\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n * If feeDistributionInfo is omitted, legacy percentages are mirrored to both rows.\n */\n assetBuybackPercentWad?: bigint;\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n */\n numeraireBuybackPercentWad?: bigint;\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n */\n beneficiaryPercentWad?: bigint;\n /**\n * @deprecated Use feeDistributionInfo.* fields instead.\n */\n lpPercentWad?: bigint;\n\n // Optional graduation calldata (called when pool graduates)\n graduationCalldata?: `0x${string}`;\n\n // Graduation threshold configuration (rehype-only)\n // Market cap in USD at which pool can graduate. Requires numerairePrice (from withCurves() or explicit).\n graduationMarketCap?: number;\n // Price of numeraire in USD. Optional if using withCurves() (reuses that value). Required with poolConfig().\n numerairePrice?: number;\n // Direct tick value for graduation threshold. Use graduationMarketCap for USD-based config.\n farTick?: number;\n}\n\n// Decay fee schedule state for multicurve pools using a dynamic-fee hook\nexport interface MulticurveDecayFeeSchedule {\n startingTime: number;\n startFee: number;\n endFee: number;\n lastFee: number;\n durationSeconds: number;\n}\n\nexport type MulticurveInitializerConfig =\n | { type: 'standard' }\n | { type: 'scheduled'; startTime: number }\n | {\n type: 'decay';\n startTime: number;\n startFee: number;\n durationSeconds: number;\n }\n | { type: 'rehype'; config: RehypeDopplerHookConfig };\n\n// Create Multicurve initializer parameters\nexport interface CreateMulticurveParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Pool configuration for multicurve initializer\n pool: {\n // For decay initializer mode, this is the terminal fee (endFee).\n fee: number;\n tickSpacing: number;\n curves: MulticurveCurve[];\n // Optional beneficiaries to lock the pool (fee collection only, no migration)\n beneficiaries?: BeneficiaryData[];\n };\n\n // Preferred initializer configuration. Defaults to { type: 'standard' }.\n initializer?: MulticurveInitializerConfig;\n\n /**\n * @deprecated Use initializer: { type: 'scheduled', startTime } instead.\n * Retained for backwards compatibility.\n */\n // Optional scheduled launch configuration\n schedule?: {\n startTime: number;\n };\n\n /**\n * @deprecated Use initializer: { type: 'rehype', config } instead.\n * Retained for backwards compatibility.\n */\n dopplerHook?: RehypeDopplerHookConfig;\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration\n governance: GovernanceOption<C>;\n\n // Migration configuration (can be any supported migrator: V2, V3, or V4)\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n\n // Optional transaction gas limit override for the create() transaction\n gas?: bigint;\n}\n\n// Final Params object that gets passed as arg to create\nexport interface CreateParams {\n initialSupply: bigint;\n numTokensToSell: bigint;\n numeraire: Address;\n tokenFactory: Address;\n tokenFactoryData: `0x${string}`;\n governanceFactory: Address;\n governanceFactoryData: `0x${string}`;\n poolInitializer: Address;\n poolInitializerData: `0x${string}`;\n liquidityMigrator: Address;\n liquidityMigratorData: `0x${string}`;\n integrator: Address;\n salt: `0x${string}`;\n}\n\n// Optional per-call module address overrides. When provided, these take precedence\n// over chain defaults resolved via getAddresses(chainId).\nexport interface ModuleAddressOverrides {\n // Core deployment & routing\n airlock?: Address;\n tokenFactory?: Address;\n\n // Initializers\n v3Initializer?: Address;\n lockableV3Initializer?: Address;\n v4Initializer?: Address;\n v4MulticurveInitializer?: Address;\n v4ScheduledMulticurveInitializer?: Address;\n v4DecayMulticurveInitializer?: Address;\n dopplerHookInitializer?: Address;\n rehypeDopplerHookInitializer?: Address;\n\n // DopplerHooks\n /**\n * @deprecated Use rehypeDopplerHookInitializer instead.\n */\n rehypeDopplerHook?: Address;\n\n // Governance\n governanceFactory?: Address;\n\n // Dynamic auction infra\n poolManager?: Address;\n dopplerDeployer?: Address;\n\n // Migrators\n v2Migrator?: Address;\n v4Migrator?: Address;\n dopplerHookMigrator?: Address;\n rehypeDopplerHookMigrator?: Address;\n noOpMigrator?: Address;\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkQRTABC4Z_js = require('./chunk-QRTABC4Z.js');
|
|
4
|
+
var chunkJ62YDWIK_js = require('./chunk-J62YDWIK.js');
|
|
5
|
+
var chunkQAPQGDWK_js = require('./chunk-QAPQGDWK.js');
|
|
6
6
|
var viem = require('viem');
|
|
7
7
|
|
|
8
8
|
var DEFAULT_MAX_ITERATIONS = 1e6;
|
|
@@ -38,9 +38,7 @@ function normalizeHexFragment(value, label) {
|
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
if (!/^[0-9a-f]+$/i.test(normalized)) {
|
|
41
|
-
throw new Error(
|
|
42
|
-
`TokenAddressMiner: ${label} must be a hexadecimal string`
|
|
43
|
-
);
|
|
41
|
+
throw new Error(`TokenAddressMiner: ${label} must be a hexadecimal string`);
|
|
44
42
|
}
|
|
45
43
|
return normalized;
|
|
46
44
|
}
|
|
@@ -107,7 +105,7 @@ function buildTokenInitHash(params) {
|
|
|
107
105
|
return viem.keccak256(
|
|
108
106
|
viem.encodePacked(
|
|
109
107
|
["bytes", "bytes"],
|
|
110
|
-
[customBytecode ??
|
|
108
|
+
[customBytecode ?? chunkQAPQGDWK_js.dopplerDN404_default, initHashData2]
|
|
111
109
|
)
|
|
112
110
|
);
|
|
113
111
|
}
|
|
@@ -146,7 +144,7 @@ function buildTokenInitHash(params) {
|
|
|
146
144
|
tokenURI
|
|
147
145
|
]
|
|
148
146
|
);
|
|
149
|
-
const defaultBytecode = isTokenFactory80(tokenFactory) ?
|
|
147
|
+
const defaultBytecode = isTokenFactory80(tokenFactory) ? chunkJ62YDWIK_js.derc2080_default : chunkQRTABC4Z_js.derc20_default;
|
|
150
148
|
return viem.keccak256(
|
|
151
149
|
viem.encodePacked(
|
|
152
150
|
["bytes", "bytes"],
|
|
@@ -208,14 +206,16 @@ function mineTokenAddress(params) {
|
|
|
208
206
|
const candidateRaw = computeCreate2AddressFast(tokenBuffer);
|
|
209
207
|
const candidateHex = candidateRaw.slice(2);
|
|
210
208
|
iterations++;
|
|
211
|
-
if (normalizedPrefix && !candidateHex.startsWith(normalizedPrefix))
|
|
209
|
+
if (normalizedPrefix && !candidateHex.startsWith(normalizedPrefix))
|
|
210
|
+
continue;
|
|
212
211
|
if (normalizedSuffix && !candidateHex.endsWith(normalizedSuffix)) continue;
|
|
213
212
|
let hookAddressRaw;
|
|
214
213
|
if (hookBuffer) {
|
|
215
214
|
updateSaltInBuffer(hookBuffer, salt);
|
|
216
215
|
hookAddressRaw = computeCreate2AddressFast(hookBuffer);
|
|
217
216
|
const hookHex = hookAddressRaw.slice(2);
|
|
218
|
-
if (hookConfig?.prefix && !hookHex.startsWith(hookConfig.prefix))
|
|
217
|
+
if (hookConfig?.prefix && !hookHex.startsWith(hookConfig.prefix))
|
|
218
|
+
continue;
|
|
219
219
|
if (hookConfig?.suffix && !hookHex.endsWith(hookConfig.suffix)) continue;
|
|
220
220
|
}
|
|
221
221
|
const saltHex = `0x${salt.toString(16).padStart(64, "0")}`;
|
|
@@ -237,5 +237,5 @@ function mineTokenAddress(params) {
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
exports.mineTokenAddress = mineTokenAddress;
|
|
240
|
-
//# sourceMappingURL=chunk-
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
240
|
+
//# sourceMappingURL=chunk-WNUB3UTT.js.map
|
|
241
|
+
//# sourceMappingURL=chunk-WNUB3UTT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/tokenAddressMiner.ts"],"names":["keccak256","name","symbol","decodeAbiParameters","initHashData","encodeAbiParameters","encodePacked","dopplerDN404_default","derc2080_default","derc20_default","getAddress"],"mappings":";;;;;;;AAgBA,IAAM,sBAAA,GAAyB,GAAA;AAK/B,IAAM,wBAAA,GACJ,4CAAA;AAEF,SAAS,iBAAiB,YAAA,EAAgC;AACxD,EAAA,OAAO,YAAA,CAAa,WAAA,EAAY,KAAM,wBAAA,CAAyB,WAAA,EAAY;AAC7E;AAoCA,IAAM,uBAAA,GAA0B;AAAA,EAC9B,EAAE,MAAM,QAAA,EAAS;AAAA,EACjB,EAAE,MAAM,QAAA,EAAS;AAAA,EACjB,EAAE,MAAM,SAAA,EAAU;AAAA,EAClB,EAAE,MAAM,SAAA,EAAU;AAAA,EAClB,EAAE,MAAM,WAAA,EAAY;AAAA,EACpB,EAAE,MAAM,WAAA,EAAY;AAAA,EACpB,EAAE,MAAM,QAAA;AACV,CAAA;AAEA,IAAM,yBAAA,GAA4B;AAAA,EAChC,EAAE,MAAM,QAAA,EAAS;AAAA,EACjB,EAAE,MAAM,QAAA,EAAS;AAAA,EACjB,EAAE,MAAM,QAAA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BAAW,YAAY,CAAA;AAAA,MACrC,UAAA;AAAA,MACA,WAAA,EAAa,cAAA,GACRA,eAAA,CAAW,cAAc,CAAA,GAC1B;AAAA,KACN;AAAA,EACF;AAEA,EAAA,MAAM,cAAwB,EAAC;AAC/B,EAAA,IAAI,gBAAA,EAAkB,WAAA,CAAY,IAAA,CAAK,CAAA,OAAA,EAAU,aAAa,CAAA,CAAE,CAAA;AAChE,EAAA,IAAI,gBAAA,EAAkB,WAAA,CAAY,IAAA,CAAK,CAAA,OAAA,EAAU,aAAa,CAAA,CAAE,CAAA;AAEhE,EAAA,MAAM,IAAI,KAAA;AAAA,IACR,mDAAmD,WAAA,CAAY,IAAA;AAAA,MAC7D;AAAA,KACD,WAAW,aAAa,CAAA,WAAA;AAAA,GAC3B;AACF","file":"chunk-WNUB3UTT.js","sourcesContent":["import {\n type Address,\n type Hash,\n type Hex,\n encodeAbiParameters,\n encodePacked,\n keccak256,\n getAddress,\n decodeAbiParameters,\n} from 'viem';\nimport {\n DERC20Bytecode,\n DERC2080Bytecode,\n DopplerDN404Bytecode,\n} from '../abis';\n\nconst DEFAULT_MAX_ITERATIONS = 1_000_000;\n\nexport type TokenVariant = 'standard' | 'doppler404';\n\n// TokenFactory80 has the same deterministic CREATE2 address across all chains where it is deployed.\nconst TOKEN_FACTORY_80_ADDRESS =\n '0xf0B5141dD9096254B2ca624dff26024f46087229' as const;\n\nfunction isTokenFactory80(tokenFactory: Address): boolean {\n return tokenFactory.toLowerCase() === TOKEN_FACTORY_80_ADDRESS.toLowerCase();\n}\n\nexport interface TokenAddressHookConfig {\n deployer: Address;\n initCodeHash: Hash;\n prefix?: string;\n suffix?: string;\n}\n\nexport interface TokenAddressMiningParams {\n /**\n * Vanity prefix (hex). Keep as `''` (empty string) if you only want to mine a suffix.\n * Note: this is required for backwards compatibility with older SDK versions.\n */\n prefix: string;\n /** Vanity suffix (hex), useful as an identifier at the end of the address. */\n suffix?: string;\n tokenFactory: Address;\n initialSupply: bigint;\n recipient: Address;\n owner: Address;\n tokenData: Hex;\n tokenVariant?: TokenVariant;\n customBytecode?: Hex;\n maxIterations?: number;\n startSalt?: bigint;\n hook?: TokenAddressHookConfig;\n}\n\nexport interface TokenAddressMiningResult {\n salt: Hash;\n tokenAddress: Address;\n iterations: number;\n hookAddress?: Address;\n}\n\nconst STANDARD_TOKEN_DATA_ABI = [\n { type: 'string' },\n { type: 'string' },\n { type: 'uint256' },\n { type: 'uint256' },\n { type: 'address[]' },\n { type: 'uint256[]' },\n { type: 'string' },\n] as const;\n\nconst DOPPLER404_TOKEN_DATA_ABI = [\n { type: 'string' },\n { type: 'string' },\n { type: 'string' },\n { type: 'uint256' },\n] as const;\n\nfunction normalizeHexFragment(\n value: string,\n label: 'prefix' | 'suffix',\n): string {\n const normalized = value.trim().toLowerCase().replace(/^0x/, '');\n if (normalized.length === 0) {\n throw new Error(\n `TokenAddressMiner: ${label} must contain at least one hex character`,\n );\n }\n if (normalized.length > 40) {\n throw new Error(\n `TokenAddressMiner: ${label} cannot exceed 40 hex characters`,\n );\n }\n if (!/^[0-9a-f]+$/i.test(normalized)) {\n throw new Error(`TokenAddressMiner: ${label} must be a hexadecimal string`);\n }\n return normalized;\n}\n\nfunction computeCreate2Address(\n salt: Hash,\n initCodeHash: Hash,\n deployer: Address,\n): Address {\n const encoded = encodePacked(\n ['bytes1', 'address', 'bytes32', 'bytes32'],\n ['0xff', deployer, salt, initCodeHash],\n );\n return getAddress(`0x${keccak256(encoded).slice(-40)}`);\n}\n\n/**\n * Helper to convert hex string to Uint8Array\n */\nfunction hexToBytes(hex: string): Uint8Array {\n const cleanHex = hex.startsWith('0x') ? hex.slice(2) : hex;\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < bytes.length; i++) {\n bytes[i] = parseInt(cleanHex.substr(i * 2, 2), 16);\n }\n return bytes;\n}\n\n/**\n * Helper to convert Uint8Array to hex string\n */\nfunction bytesToHex(bytes: Uint8Array): string {\n return (\n '0x' +\n Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, '0'))\n .join('')\n );\n}\n\n/**\n * Pre-compute CREATE2 buffer with constant prefix for fast mining\n * Buffer layout: 0xff (1 byte) + deployer (20 bytes) + salt (32 bytes) + initCodeHash (32 bytes) = 85 bytes\n */\nfunction prepareCreate2Buffer(\n deployer: Address,\n initCodeHash: Hash,\n): Uint8Array {\n const buffer = new Uint8Array(85);\n buffer[0] = 0xff;\n const deployerBytes = hexToBytes(deployer);\n buffer.set(deployerBytes, 1);\n const initCodeHashBytes = hexToBytes(initCodeHash);\n buffer.set(initCodeHashBytes, 53); // 1 + 20 + 32 = 53\n return buffer;\n}\n\n/**\n * Update salt in pre-computed CREATE2 buffer (bytes 21-52)\n * Uses direct byte manipulation instead of string conversion\n */\nfunction updateSaltInBuffer(buffer: Uint8Array, salt: bigint): void {\n // Salt is 32 bytes, positioned at offset 21 (after 0xff + 20-byte deployer)\n // Clear salt region first\n for (let i = 21; i < 53; i++) {\n buffer[i] = 0;\n }\n // Write salt bytes from right to left (big-endian)\n let remaining = salt;\n for (let i = 52; remaining > 0n && i >= 21; i--) {\n buffer[i] = Number(remaining & 0xffn);\n remaining >>= 8n;\n }\n}\n\n/**\n * Compute CREATE2 address from pre-computed buffer (fast version for mining)\n * Returns raw lowercase address without checksum for comparison\n */\nfunction computeCreate2AddressFast(buffer: Uint8Array): string {\n const hash = keccak256(bytesToHex(buffer) as Hex);\n // Return last 40 hex chars (20 bytes) as lowercase address\n return '0x' + hash.slice(-40).toLowerCase();\n}\n\nfunction buildTokenInitHash(params: {\n variant: TokenVariant;\n tokenFactory: Address;\n tokenData: Hex;\n initialSupply: bigint;\n recipient: Address;\n owner: Address;\n customBytecode?: Hex;\n}): Hash {\n const {\n variant,\n tokenFactory,\n tokenData,\n initialSupply,\n recipient,\n owner,\n customBytecode,\n } = params;\n\n if (variant === 'doppler404') {\n const [name, symbol, baseURI] = decodeAbiParameters(\n DOPPLER404_TOKEN_DATA_ABI,\n tokenData,\n ) as readonly [string, string, string, bigint | undefined];\n\n const initHashData = encodeAbiParameters(\n [\n { type: 'string' },\n { type: 'string' },\n { type: 'uint256' },\n { type: 'address' },\n { type: 'address' },\n { type: 'string' },\n ],\n [name, symbol, initialSupply, recipient, owner, baseURI],\n );\n\n return keccak256(\n encodePacked(\n ['bytes', 'bytes'],\n [customBytecode ?? (DopplerDN404Bytecode as Hex), initHashData],\n ),\n ) as Hash;\n }\n\n const [\n name,\n symbol,\n yearlyMintRate,\n vestingDuration,\n vestingRecipients,\n vestingAmounts,\n tokenURI,\n ] = decodeAbiParameters(STANDARD_TOKEN_DATA_ABI, tokenData) as readonly [\n string,\n string,\n bigint,\n bigint,\n readonly Address[],\n readonly bigint[],\n string,\n ];\n\n const initHashData = encodeAbiParameters(\n [\n { type: 'string' },\n { type: 'string' },\n { type: 'uint256' },\n { type: 'address' },\n { type: 'address' },\n { type: 'uint256' },\n { type: 'uint256' },\n { type: 'address[]' },\n { type: 'uint256[]' },\n { type: 'string' },\n ],\n [\n name,\n symbol,\n initialSupply,\n recipient,\n owner,\n yearlyMintRate,\n vestingDuration,\n Array.from(vestingRecipients),\n Array.from(vestingAmounts),\n tokenURI,\n ],\n );\n\n const defaultBytecode = isTokenFactory80(tokenFactory)\n ? (DERC2080Bytecode as Hex)\n : (DERC20Bytecode as Hex);\n\n return keccak256(\n encodePacked(\n ['bytes', 'bytes'],\n [customBytecode ?? defaultBytecode, initHashData],\n ),\n ) as Hash;\n}\n\nexport function mineTokenAddress(\n params: TokenAddressMiningParams,\n): TokenAddressMiningResult {\n const {\n prefix,\n suffix,\n tokenFactory,\n initialSupply,\n recipient,\n owner,\n tokenData,\n tokenVariant = 'standard',\n customBytecode,\n maxIterations = DEFAULT_MAX_ITERATIONS,\n startSalt = 0n,\n hook,\n } = params;\n\n if (maxIterations <= 0 || !Number.isFinite(maxIterations)) {\n throw new Error(\n 'TokenAddressMiner: maxIterations must be a positive finite number',\n );\n }\n if (startSalt < 0n) {\n throw new Error('TokenAddressMiner: startSalt cannot be negative');\n }\n\n const prefixTrimmed = prefix.trim();\n const suffixTrimmed = suffix?.trim();\n\n const normalizedPrefix =\n prefixTrimmed.length === 0\n ? undefined\n : normalizeHexFragment(prefixTrimmed, 'prefix');\n const normalizedSuffix =\n !suffixTrimmed || suffixTrimmed.length === 0\n ? undefined\n : normalizeHexFragment(suffixTrimmed, 'suffix');\n\n if (!normalizedPrefix && !normalizedSuffix) {\n throw new Error('TokenAddressMiner: must provide prefix and/or suffix');\n }\n\n const tokenInitHash = buildTokenInitHash({\n variant: tokenVariant,\n tokenFactory,\n tokenData,\n initialSupply,\n recipient,\n owner,\n customBytecode,\n });\n\n const hookConfig = hook\n ? {\n deployer: hook.deployer,\n initCodeHash: hook.initCodeHash,\n prefix:\n hook.prefix && hook.prefix.trim().length > 0\n ? normalizeHexFragment(hook.prefix, 'prefix')\n : undefined,\n suffix:\n hook.suffix && hook.suffix.trim().length > 0\n ? normalizeHexFragment(hook.suffix, 'suffix')\n : undefined,\n }\n : undefined;\n\n const maxSalt = startSalt + BigInt(maxIterations);\n let iterations = 0;\n\n // Pre-allocate CREATE2 buffer with constant parts (optimization)\n const tokenBuffer = prepareCreate2Buffer(tokenFactory, tokenInitHash);\n const hookBuffer = hookConfig\n ? prepareCreate2Buffer(hookConfig.deployer, hookConfig.initCodeHash)\n : null;\n\n for (let salt = startSalt; salt < maxSalt; salt++) {\n // Update salt in pre-computed buffer (avoids string formatting)\n updateSaltInBuffer(tokenBuffer, salt);\n\n // Compute token address using fast method (no checksum)\n const candidateRaw = computeCreate2AddressFast(tokenBuffer);\n const candidateHex = candidateRaw.slice(2);\n iterations++;\n\n if (normalizedPrefix && !candidateHex.startsWith(normalizedPrefix))\n continue;\n if (normalizedSuffix && !candidateHex.endsWith(normalizedSuffix)) continue;\n\n let hookAddressRaw: string | undefined;\n if (hookBuffer) {\n updateSaltInBuffer(hookBuffer, salt);\n hookAddressRaw = computeCreate2AddressFast(hookBuffer);\n const hookHex = hookAddressRaw.slice(2);\n if (hookConfig?.prefix && !hookHex.startsWith(hookConfig.prefix))\n continue;\n if (hookConfig?.suffix && !hookHex.endsWith(hookConfig.suffix)) continue;\n }\n\n // Found a match! Convert to proper format for return\n const saltHex = `0x${salt.toString(16).padStart(64, '0')}` as Hash;\n return {\n salt: saltHex,\n tokenAddress: getAddress(candidateRaw) as Address,\n iterations,\n hookAddress: hookAddressRaw\n ? (getAddress(hookAddressRaw) as Address)\n : undefined,\n };\n }\n\n const constraints: string[] = [];\n if (normalizedPrefix) constraints.push(`prefix ${prefixTrimmed}`);\n if (normalizedSuffix) constraints.push(`suffix ${suffixTrimmed}`);\n\n throw new Error(\n `TokenAddressMiner: could not find salt matching ${constraints.join(\n ' and ',\n )} within ${maxIterations} iterations`,\n );\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computeTicks } from './chunk-
|
|
1
|
+
import { computeTicks } from './chunk-ZEDJUNC6.mjs';
|
|
2
2
|
import { computeOptimalGamma } from './chunk-H3B54PFV.mjs';
|
|
3
|
-
import { validateMarketCapParameters, marketCapToTicksForDynamicAuction } from './chunk-
|
|
3
|
+
import { validateMarketCapParameters, marketCapToTicksForDynamicAuction } from './chunk-GSBQIVME.mjs';
|
|
4
4
|
import { DEFAULT_V4_YEARLY_MINT_RATE, ZERO_ADDRESS, DOPPLER_MAX_TICK_SPACING, DEFAULT_AUCTION_DURATION, DEFAULT_EPOCH_LENGTH, V4_MAX_FEE, FEE_TIERS } from './chunk-IWJOPXYN.mjs';
|
|
5
|
-
import { isNoOpEnabledChain, isLaunchpadEnabledChain } from './chunk-
|
|
5
|
+
import { isNoOpEnabledChain, isLaunchpadEnabledChain } from './chunk-WKWP42TD.mjs';
|
|
6
6
|
|
|
7
7
|
// src/builders/DynamicAuctionBuilder.ts
|
|
8
8
|
var DynamicAuctionBuilder = class _DynamicAuctionBuilder {
|
|
@@ -253,6 +253,12 @@ var DynamicAuctionBuilder = class _DynamicAuctionBuilder {
|
|
|
253
253
|
withV4Migrator(address) {
|
|
254
254
|
return this.overrideModule("v4Migrator", address);
|
|
255
255
|
}
|
|
256
|
+
withDopplerHookMigrator(address) {
|
|
257
|
+
return this.overrideModule("dopplerHookMigrator", address);
|
|
258
|
+
}
|
|
259
|
+
withRehypeDopplerHookMigrator(address) {
|
|
260
|
+
return this.overrideModule("rehypeDopplerHookMigrator", address);
|
|
261
|
+
}
|
|
256
262
|
withNoOpMigrator(address) {
|
|
257
263
|
return this.overrideModule("noOpMigrator", address);
|
|
258
264
|
}
|
|
@@ -304,7 +310,13 @@ var DynamicAuctionBuilder = class _DynamicAuctionBuilder {
|
|
|
304
310
|
});
|
|
305
311
|
const duration = config.duration ?? DEFAULT_AUCTION_DURATION;
|
|
306
312
|
const epochLength = config.epochLength ?? DEFAULT_EPOCH_LENGTH;
|
|
307
|
-
const gamma2 = config.gamma ?? computeOptimalGamma(
|
|
313
|
+
const gamma2 = config.gamma ?? computeOptimalGamma(
|
|
314
|
+
startTick,
|
|
315
|
+
endTick,
|
|
316
|
+
duration,
|
|
317
|
+
epochLength,
|
|
318
|
+
tickSpacing
|
|
319
|
+
);
|
|
308
320
|
this.auction = {
|
|
309
321
|
duration,
|
|
310
322
|
epochLength,
|
|
@@ -320,7 +332,7 @@ var DynamicAuctionBuilder = class _DynamicAuctionBuilder {
|
|
|
320
332
|
if (!this.auction) throw new Error("auction configuration is required");
|
|
321
333
|
if (this.migration.type === "noOp") {
|
|
322
334
|
throw new Error(
|
|
323
|
-
"noOp migration is not supported for dynamic auctions. Use uniswapV2 or
|
|
335
|
+
"noOp migration is not supported for dynamic auctions. Use uniswapV2, uniswapV4, or dopplerHook migration instead."
|
|
324
336
|
);
|
|
325
337
|
}
|
|
326
338
|
const governance = this.governance ?? (isNoOpEnabledChain(this.chainId) ? { type: "noOp" } : { type: "default" });
|
|
@@ -359,5 +371,5 @@ var DynamicAuctionBuilder = class _DynamicAuctionBuilder {
|
|
|
359
371
|
};
|
|
360
372
|
|
|
361
373
|
export { DynamicAuctionBuilder };
|
|
362
|
-
//# sourceMappingURL=chunk-
|
|
363
|
-
//# sourceMappingURL=chunk-
|
|
374
|
+
//# sourceMappingURL=chunk-WNWK2QMU.mjs.map
|
|
375
|
+
//# sourceMappingURL=chunk-WNWK2QMU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/builders/DynamicAuctionBuilder.ts"],"names":["gamma"],"mappings":";;;;;;;AA8BO,IAAM,qBAAA,GAAN,MAAM,sBAAA,CAEsB;AAAA,EAgCjC,YAAY,OAAA,EAAY;AACtB,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AAAA,EAEA,OAAO,SACL,OAAA,EAC0B;AAC1B,IAAA,OAAO,IAAI,uBAAsB,OAAO,CAAA;AAAA,EAC1C;AAAA,EAEA,YACE,MAAA,EAeM;AACN,IAAA,IAAI,MAAA,IAAU,MAAA,IAAU,MAAA,IAAU,MAAA,CAAO,SAAS,YAAA,EAAc;AAC9D,MAAA,IAAA,CAAK,KAAA,GAAQ;AAAA,QACX,IAAA,EAAM,YAAA;AAAA,QACN,MAAM,MAAA,CAAO,IAAA;AAAA,QACb,QAAQ,MAAA,CAAO,MAAA;AAAA,QACf,SAAS,MAAA,CAAO,OAAA;AAAA,QAChB,MAAM,MAAA,CAAO;AAAA,OACf;AAAA,IACF,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,KAAA,GAAQ;AAAA,QACX,IAAA,EAAM,UAAA;AAAA,QACN,MAAM,MAAA,CAAO,IAAA;AAAA,QACb,QAAQ,MAAA,CAAO,MAAA;AAAA,QACf,UAAU,MAAA,CAAO,QAAA;AAAA,QACjB,cAAA,EAAgB,OAAO,cAAA,IAAkB;AAAA,OAC3C;AAAA,IACF;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AAAA,EAEA,WAAW,MAAA,EAIF;AACP,IAAA,IAAA,CAAK,IAAA,GAAO;AAAA,MACV,eAAe,MAAA,CAAO,aAAA;AA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EzC,IAAA,OAAO;AAAA,MACL,OAAO,IAAA,CAAK,KAAA;AAAA,MACZ,MAAM,IAAA,CAAK,IAAA;AAAA,MACX,OAAA;AAAA,MACA,MAAM,IAAA,CAAK,IAAA;AAAA,MACX,SAAS,IAAA,CAAK,OAAA;AAAA,MACd,UAAA;AAAA,MACA,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,UAAA,EAAY,KAAK,UAAA,IAAc,YAAA;AAAA,MAC/B,aAAa,IAAA,CAAK,WAAA;AAAA,MAClB,iBAAiB,IAAA,CAAK,eAAA;AAAA,MACtB,gBAAgB,IAAA,CAAK,cAAA;AAAA,MACrB,SAAS,IAAA,CAAK,eAAA;AAAA,MACd,KAAK,IAAA,CAAK;AAAA,KACZ;AAAA,EACF;AACF","file":"chunk-WNWK2QMU.mjs","sourcesContent":["import type { Address } from 'viem';\nimport {\n DEFAULT_AUCTION_DURATION,\n DEFAULT_EPOCH_LENGTH,\n DEFAULT_V4_YEARLY_MINT_RATE,\n DOPPLER_MAX_TICK_SPACING,\n FEE_TIERS,\n V4_MAX_FEE,\n ZERO_ADDRESS,\n} from '../constants';\nimport {\n computeOptimalGamma,\n marketCapToTicksForDynamicAuction,\n validateMarketCapParameters,\n} from '../utils';\nimport {\n isNoOpEnabledChain,\n isLaunchpadEnabledChain,\n type CreateDynamicAuctionParams,\n type GovernanceOption,\n type MigrationConfig,\n type PriceRange,\n type VestingConfig,\n type TokenConfig,\n type DynamicAuctionMarketCapConfig,\n type ModuleAddressOverrides,\n} from '../types';\nimport { type SupportedChainId } from '../addresses';\nimport { computeTicks, type BaseAuctionBuilder } from './shared';\n\nexport class DynamicAuctionBuilder<\n C extends SupportedChainId,\n> implements BaseAuctionBuilder<C> {\n private token?: TokenConfig;\n private sale?: CreateDynamicAuctionParams<C>['sale'];\n private auction?: CreateDynamicAuctionParams<C>['auction'];\n private pool?: CreateDynamicAuctionParams<C>['pool'];\n private vesting?: VestingConfig;\n private governance?: GovernanceOption<C>;\n private migration?: MigrationConfig;\n private integrator?: Address;\n private userAddress?: Address;\n private startTimeOffset?: number;\n private blockTimestamp?: number;\n private moduleAddresses?: ModuleAddressOverrides;\n private gasLimit?: bigint;\n // Deferred market cap config - converted to pool and auction in build()\n private marketCapConfig?: {\n marketCap: { start: number; min: number };\n numerairePrice: number;\n tokenSupply?: bigint;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n fee?: number;\n tickSpacing?: number;\n minProceeds: bigint;\n maxProceeds: bigint;\n duration?: number;\n epochLength?: number;\n gamma?: number;\n numPdSlugs?: number;\n };\n public chainId: C;\n\n constructor(chainId: C) {\n this.chainId = chainId;\n }\n\n static forChain<C extends SupportedChainId>(\n chainId: C,\n ): DynamicAuctionBuilder<C> {\n return new DynamicAuctionBuilder(chainId);\n }\n\n tokenConfig(\n params:\n | {\n type?: 'standard';\n name: string;\n symbol: string;\n tokenURI: string;\n yearlyMintRate?: bigint;\n }\n | {\n type: 'doppler404';\n name: string;\n symbol: string;\n baseURI: string;\n unit?: bigint;\n },\n ): this {\n if (params && 'type' in params && params.type === 'doppler404') {\n this.token = {\n type: 'doppler404',\n name: params.name,\n symbol: params.symbol,\n baseURI: params.baseURI,\n unit: params.unit,\n };\n } else {\n this.token = {\n type: 'standard',\n name: params.name,\n symbol: params.symbol,\n tokenURI: params.tokenURI,\n yearlyMintRate: params.yearlyMintRate ?? DEFAULT_V4_YEARLY_MINT_RATE,\n };\n }\n return this;\n }\n\n saleConfig(params: {\n initialSupply: bigint;\n numTokensToSell: bigint;\n numeraire?: Address;\n }): this {\n this.sale = {\n initialSupply: params.initialSupply,\n numTokensToSell: params.numTokensToSell,\n numeraire: params.numeraire ?? ZERO_ADDRESS,\n };\n return this;\n }\n\n poolConfig(params: { fee: number; tickSpacing: number }): this {\n // Mutual exclusion: cannot use poolConfig() after withMarketCapRange()\n if (this.marketCapConfig) {\n throw new Error(\n 'Cannot use poolConfig() after withMarketCapRange(). ' +\n 'Use withMarketCapRange() for market cap-based configuration, ' +\n 'or poolConfig() + auctionByTicks() for manual tick configuration.',\n );\n }\n\n // Validate tick spacing against Doppler contract constraint\n if (params.tickSpacing > DOPPLER_MAX_TICK_SPACING) {\n throw new Error(\n `Dynamic auctions require tickSpacing <= ${DOPPLER_MAX_TICK_SPACING} (Doppler.sol MAX_TICK_SPACING). ` +\n `Got tickSpacing=${params.tickSpacing}. ` +\n `Use a smaller tickSpacing, or use withMarketCapRange() which handles this automatically.`,\n );\n }\n\n this.pool = { fee: params.fee, tickSpacing: params.tickSpacing };\n return this;\n }\n\n // Provide ticks directly\n auctionByTicks(params: {\n startTick: number;\n endTick: number;\n minProceeds: bigint;\n maxProceeds: bigint;\n duration?: number;\n epochLength?: number;\n gamma?: number;\n numPdSlugs?: number;\n }): this {\n const duration = params.duration ?? DEFAULT_AUCTION_DURATION;\n const epochLength = params.epochLength ?? DEFAULT_EPOCH_LENGTH;\n const gamma =\n params.gamma ??\n (this.pool\n ? computeOptimalGamma(\n params.startTick,\n params.endTick,\n duration,\n epochLength,\n this.pool.tickSpacing,\n )\n : undefined);\n this.auction = {\n duration,\n epochLength,\n startTick: params.startTick,\n endTick: params.endTick,\n gamma,\n minProceeds: params.minProceeds,\n maxProceeds: params.maxProceeds,\n numPdSlugs: params.numPdSlugs,\n };\n return this;\n }\n\n /**\n * @deprecated Use withMarketCapRange() instead for more intuitive market cap configuration\n */\n auctionByPriceRange(params: {\n priceRange: PriceRange;\n minProceeds: bigint;\n maxProceeds: bigint;\n duration?: number;\n epochLength?: number;\n gamma?: number;\n tickSpacing?: number; // optional; will use pool.tickSpacing if not provided\n numPdSlugs?: number;\n }): this {\n const tickSpacing = params.tickSpacing ?? this.pool?.tickSpacing;\n if (!tickSpacing) {\n throw new Error(\n 'tickSpacing is required (set poolConfig first or pass tickSpacing)',\n );\n }\n const ticks = computeTicks(params.priceRange, tickSpacing);\n return this.auctionByTicks({\n startTick: ticks.startTick,\n endTick: ticks.endTick,\n minProceeds: params.minProceeds,\n maxProceeds: params.maxProceeds,\n duration: params.duration,\n epochLength: params.epochLength,\n gamma: params.gamma,\n numPdSlugs: params.numPdSlugs,\n });\n }\n\n /**\n * Configure auction using target market cap range.\n * Converts market cap values (in USD) to Uniswap ticks.\n *\n * V4 pools support custom fees (0-100,000). Standard fee tiers auto-derive\n * tickSpacing; custom fees require explicit tickSpacing (max: 30).\n *\n * @param params - Market cap configuration with auction parameters\n * @returns Builder instance for chaining\n *\n * @example Standard fee tier (auto tickSpacing)\n * ```ts\n * builder\n * .saleConfig({ initialSupply, numTokensToSell, numeraire: WETH })\n * .withMarketCapRange({\n * marketCap: { start: 500_000, min: 50_000 },\n * numerairePrice: 3000,\n * minProceeds: parseEther('10'),\n * maxProceeds: parseEther('1000'),\n * fee: 10000, // Standard tier, tickSpacing auto = 30\n * })\n * ```\n *\n * @example Custom fee (requires explicit tickSpacing)\n * ```ts\n * builder\n * .saleConfig({ initialSupply, numTokensToSell, numeraire: WETH })\n * .withMarketCapRange({\n * marketCap: { start: 500_000, min: 50_000 },\n * numerairePrice: 3000,\n * minProceeds: parseEther('10'),\n * maxProceeds: parseEther('1000'),\n * fee: 2500, // Custom 0.25% fee\n * tickSpacing: 10, // Required for custom fees\n * })\n * ```\n */\n withMarketCapRange(params: DynamicAuctionMarketCapConfig): this {\n // Mutual exclusion: cannot use withMarketCapRange() after poolConfig()\n if (this.pool) {\n throw new Error(\n 'Cannot use withMarketCapRange() after poolConfig(). ' +\n 'Use withMarketCapRange() for market cap-based configuration, ' +\n 'or poolConfig() + auctionByTicks() for manual tick configuration.',\n );\n }\n\n // Basic validation that doesn't require saleConfig\n if (params.numerairePrice <= 0) {\n throw new Error('numerairePrice must be greater than 0');\n }\n if (params.marketCap.start <= 0 || params.marketCap.min <= 0) {\n throw new Error('marketCap values must be greater than 0');\n }\n if (params.marketCap.min >= params.marketCap.start) {\n throw new Error('marketCap.min must be less than marketCap.start');\n }\n\n // Validate fee if provided\n if (params.fee !== undefined && params.fee > V4_MAX_FEE) {\n throw new Error(\n `Fee ${params.fee} exceeds maximum allowed for V4 pools (${V4_MAX_FEE} = 10%). ` +\n `Use a fee between 0 and ${V4_MAX_FEE}.`,\n );\n }\n\n // Validate tickSpacing if provided\n if (\n params.tickSpacing !== undefined &&\n params.tickSpacing > DOPPLER_MAX_TICK_SPACING\n ) {\n throw new Error(\n `tickSpacing ${params.tickSpacing} exceeds maximum allowed for Doppler pools (${DOPPLER_MAX_TICK_SPACING}). ` +\n `Use tickSpacing <= ${DOPPLER_MAX_TICK_SPACING}.`,\n );\n }\n\n // Store config for deferred conversion in build()\n this.marketCapConfig = {\n marketCap: params.marketCap,\n numerairePrice: params.numerairePrice,\n tokenSupply: params.tokenSupply,\n tokenDecimals: params.tokenDecimals,\n numeraireDecimals: params.numeraireDecimals,\n fee: params.fee,\n tickSpacing: params.tickSpacing,\n minProceeds: params.minProceeds,\n maxProceeds: params.maxProceeds,\n duration: params.duration,\n epochLength: params.epochLength,\n gamma: params.gamma,\n numPdSlugs: params.numPdSlugs,\n };\n\n return this;\n }\n\n withVesting(params?: {\n duration?: bigint;\n cliffDuration?: number;\n recipients?: Address[];\n amounts?: bigint[];\n }): this {\n if (!params) {\n this.vesting = undefined;\n return this;\n }\n this.vesting = {\n duration: Number(params.duration ?? 0n),\n cliffDuration: params.cliffDuration ?? 0,\n recipients: params.recipients,\n amounts: params.amounts,\n };\n return this;\n }\n\n withGovernance(params: GovernanceOption<C>): this {\n this.governance = params;\n return this;\n }\n\n withMigration(migration: MigrationConfig): this {\n this.migration = migration;\n return this;\n }\n\n withUserAddress(address: Address): this {\n this.userAddress = address;\n return this;\n }\n\n withIntegrator(address?: Address): this {\n this.integrator = address ?? ZERO_ADDRESS;\n return this;\n }\n\n withGasLimit(gas?: bigint): this {\n this.gasLimit = gas;\n return this;\n }\n\n withTime(params?: {\n startTimeOffset?: number;\n blockTimestamp?: number;\n }): this {\n if (!params) {\n this.startTimeOffset = undefined;\n this.blockTimestamp = undefined;\n return this;\n }\n this.startTimeOffset = params.startTimeOffset;\n this.blockTimestamp = params.blockTimestamp;\n return this;\n }\n\n // Address override helpers\n private overrideModule<K extends keyof ModuleAddressOverrides>(\n key: K,\n address: NonNullable<ModuleAddressOverrides[K]>,\n ): this {\n this.moduleAddresses = {\n ...this.moduleAddresses,\n [key]: address,\n } as ModuleAddressOverrides;\n return this;\n }\n\n withTokenFactory(address: Address): this {\n return this.overrideModule('tokenFactory', address);\n }\n\n withAirlock(address: Address): this {\n return this.overrideModule('airlock', address);\n }\n\n withV4Initializer(address: Address): this {\n return this.overrideModule('v4Initializer', address);\n }\n\n withPoolManager(address: Address): this {\n return this.overrideModule('poolManager', address);\n }\n\n withDopplerDeployer(address: Address): this {\n return this.overrideModule('dopplerDeployer', address);\n }\n\n withGovernanceFactory(address: Address): this {\n return this.overrideModule('governanceFactory', address);\n }\n\n withV2Migrator(address: Address): this {\n return this.overrideModule('v2Migrator', address);\n }\n\n withV4Migrator(address: Address): this {\n return this.overrideModule('v4Migrator', address);\n }\n\n withDopplerHookMigrator(address: Address): this {\n return this.overrideModule('dopplerHookMigrator', address);\n }\n\n withRehypeDopplerHookMigrator(address: Address): this {\n return this.overrideModule('rehypeDopplerHookMigrator', address);\n }\n\n withNoOpMigrator(address: Address): this {\n return this.overrideModule('noOpMigrator', address);\n }\n\n build(): CreateDynamicAuctionParams<C> {\n if (!this.token) throw new Error('tokenConfig is required');\n if (!this.sale) throw new Error('saleConfig is required');\n if (!this.migration) throw new Error('migration configuration is required');\n if (!this.userAddress) throw new Error('userAddress is required');\n\n // Convert deferred market cap config to pool and auction if set\n if (this.marketCapConfig && !this.pool) {\n const config = this.marketCapConfig;\n\n // Get token supply from config or saleConfig\n const tokenSupply = config.tokenSupply ?? this.sale.initialSupply;\n if (!tokenSupply) {\n throw new Error(\n 'tokenSupply must be provided (either via saleConfig() or withMarketCapRange() params)',\n );\n }\n\n // Derive fee and tickSpacing\n const fee = config.fee ?? FEE_TIERS.HIGH;\n const tickSpacing = config.tickSpacing ?? DOPPLER_MAX_TICK_SPACING;\n\n // Set pool config\n this.pool = { fee, tickSpacing };\n\n // Validate market cap parameters\n const startValidation = validateMarketCapParameters(\n config.marketCap.start,\n tokenSupply,\n config.tokenDecimals,\n );\n const minValidation = validateMarketCapParameters(\n config.marketCap.min,\n tokenSupply,\n config.tokenDecimals,\n );\n\n const allWarnings = [\n ...startValidation.warnings,\n ...minValidation.warnings,\n ];\n if (allWarnings.length > 0) {\n console.warn('Market cap validation warnings:');\n allWarnings.forEach((w) => console.warn(` - ${w}`));\n }\n\n // Convert market cap range to ticks for V4 Dynamic auction\n const { startTick, endTick } = marketCapToTicksForDynamicAuction({\n marketCapRange: {\n start: config.marketCap.min,\n end: config.marketCap.start,\n },\n tokenSupply,\n numerairePriceUSD: config.numerairePrice,\n numeraire: this.sale.numeraire,\n tickSpacing,\n tokenDecimals: config.tokenDecimals ?? 18,\n numeraireDecimals: config.numeraireDecimals ?? 18,\n });\n\n // Set auction config\n const duration = config.duration ?? DEFAULT_AUCTION_DURATION;\n const epochLength = config.epochLength ?? DEFAULT_EPOCH_LENGTH;\n const gamma =\n config.gamma ??\n computeOptimalGamma(\n startTick,\n endTick,\n duration,\n epochLength,\n tickSpacing,\n );\n\n this.auction = {\n duration,\n epochLength,\n startTick,\n endTick,\n gamma,\n minProceeds: config.minProceeds,\n maxProceeds: config.maxProceeds,\n numPdSlugs: config.numPdSlugs,\n };\n }\n\n if (!this.pool) throw new Error('poolConfig is required');\n if (!this.auction) throw new Error('auction configuration is required');\n\n // Validate noOp migration is not supported for dynamic auctions\n if (this.migration.type === 'noOp') {\n throw new Error(\n 'noOp migration is not supported for dynamic auctions. ' +\n 'Use uniswapV2, uniswapV4, or dopplerHook migration instead.',\n );\n }\n\n // Default governance: noOp on supported chains, default on others (e.g., Ink)\n const governance =\n this.governance ??\n (isNoOpEnabledChain(this.chainId)\n ? { type: 'noOp' as const }\n : { type: 'default' as const });\n\n if (\n governance.type === 'launchpad' &&\n !isLaunchpadEnabledChain(this.chainId)\n ) {\n throw new Error(\n `Launchpad governance is not supported on chain ${this.chainId}. Use a supported chain or a different governance type.`,\n );\n }\n\n // Ensure gamma is set and valid\n let { gamma } = this.auction;\n if (gamma === undefined) {\n gamma = computeOptimalGamma(\n this.auction.startTick,\n this.auction.endTick,\n this.auction.duration,\n this.auction.epochLength,\n this.pool.tickSpacing,\n );\n }\n\n const auction = { ...this.auction, gamma };\n\n return {\n token: this.token,\n sale: this.sale,\n auction,\n pool: this.pool,\n vesting: this.vesting,\n governance: governance as GovernanceOption<C>,\n migration: this.migration,\n integrator: this.integrator ?? ZERO_ADDRESS,\n userAddress: this.userAddress,\n startTimeOffset: this.startTimeOffset,\n blockTimestamp: this.blockTimestamp,\n modules: this.moduleAddresses,\n gas: this.gasLimit,\n };\n }\n}\n"]}
|